Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007769OCamlstandard librarypublic2018-04-10 14:552018-04-11 14:27
ReporterMichael_Perin 
Assigned Tonojebar 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformIntel Core i7OSMac OSOS Version10.13.3
Product Version4.02.3 
Target VersionFixed in Version 
Summary0007769: Stream.junk has no effect on a Stream.of_channel until we use Stream.next
Description
On a stream made from a file, using Stream.of_channel, the function Stream.junk : 'a Stream.t -> unit
which should "Remove the first element of the stream, possibly unfreezing it before."
has no effect until we use Stream.next.

It behaves normally on a stream made from a string.

Here is a piece of code that demonstrates this strange behaviour.
Steps To Reproduce
#create a file
echo "abcdefghijklmnopqrstuvwxyz" > alphabet.txt

# execute the uploaded file
ocaml demo.ml
TagsNo tags attached.
Attached Files? file icon demo.ml [^] (1,601 bytes) 2018-04-10 14:55 [Show Content]

- Relationships

-  Notes
(0019005)
nojebar (developer)
2018-04-10 15:39

Reproduced on trunk.
(0019006)
nojebar (developer)
2018-04-10 15:49

Potential fix in https://github.com/ocaml/ocaml/pull/1714 [^]
(0019011)
nojebar (developer)
2018-04-11 14:27

PR merged, will be in 4.07.

- Issue History
Date Modified Username Field Change
2018-04-10 14:55 Michael_Perin New Issue
2018-04-10 14:55 Michael_Perin File Added: demo.ml
2018-04-10 15:39 nojebar Note Added: 0019005
2018-04-10 15:39 nojebar Assigned To => nojebar
2018-04-10 15:39 nojebar Status new => acknowledged
2018-04-10 15:49 nojebar Note Added: 0019006
2018-04-11 14:27 nojebar Note Added: 0019011
2018-04-11 14:27 nojebar Status acknowledged => resolved
2018-04-11 14:27 nojebar Resolution open => fixed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker