Project

General

Profile

Actions

Bug #12415

closed

Dir#pos reports invalid position after Dir#read

Added by djberg96 (Daniel Berger) over 8 years ago. Updated over 8 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
[ruby-core:75685]

Description

irb(main):002:0> `ls`.split("\n")
=> ["bench", "berger_spec.gemspec", "lib", "Rakefile", "README", "SCORECARD", "test"]

irb(main):003:0> dir = Dir.new(Dir.pwd)
=> #<Dir:/home/dberger/Repositories/berger_spec>

irb(main):004:0> dir.pos
=> 0

irb(main):005:0> 5.times{ dir.read }
=> 5

irb(main):006:0> dir.pos
=> 3695892277965309219 # WUT
Actions

Also available in: Atom PDF

Like0
Like0Like0