From: Run Paint Run Run Date: 2009-06-15T05:24:36+09:00 Subject: [ruby-core:23852] [Bug #1632] ARGF's Iterators Return nill Instead of self Bug #1632: ARGF's Iterators Return nill Instead of self http://redmine.ruby-lang.org/issues/show/1632 Author: Run Paint Run Run Status: Open, Priority: Normal Category: core ruby -v: ruby 1.9.2dev (2009-06-14 trunk 23689) [i686-linux] ARGF#each_char, ARGF#each_byte, ARGF#bytes, and ARGF#chars now return nil when passed a block. On 1.8 they returned self. self is preferable because: * The documentation for IO#each_char and IO#each_byte promises that self will be returned. * It allows method chaining. * It's backward compatiable. $ cd /tmp $ echo 'a' > file $ ruby -ve 'p ARGF.chars {}' file ruby 1.9.2dev (2009-06-14 trunk 23689) [i686-linux] nil $ ruby1.8 -ve 'p ARGF.chars {}' file ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux] ARGF $ ruby86 -ve 'p ARGF.each_byte {}' file ruby 1.8.6 (2009-03-31 patchlevel 368) [i686-linux] ARGF ---------------------------------------- http://redmine.ruby-lang.org