From: Nobuyoshi Nakada Date: 2006-10-18T00:25:01+09:00 Subject: Re: String not enumerable, what about IO? (was Re: Symbol < String in Ruby > 1.8) Hi, At Wed, 18 Oct 2006 00:01:11 +0900, Rick DeNatale wrote in [ruby-core:09218]: > One little quirk I just noticed is that String#lines seems to ignore a > block argument. > irb(main):002:0> "abc\ndef".lines {|l| puts l} > => # > > This is at odds with what the various each methods do: > irb(main):003:0> (1..3).each > => # > irb(main):004:0> (1..3).each {|num| puts num} > 1 > 2 > 3 > => 1..3 /each.*/ !~ "lines". Or, lines is just an alias of each_line. -- Nobu Nakada