Issue #12415 has been updated by Nobuyoshi Nakada.

Status changed from Open to Rejected

----------------------------------------
Bug #12415: Dir#pos reports invalid position after Dir#read
https://bugs.ruby-lang.org/issues/12415#change-58821

* Author: Daniel Berger
* Status: Rejected
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
    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



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>