From: Dave Thomas Date: 2008-03-04T05:07:08+09:00 Subject: Am I misinterpreting the new keyword arguments to IO.foreach and friends? I was expecting this to pass lines to the block: IO.foreach("testfile", mode: "rb", encoding: "ascii-8bit") do |content| p content end Instead, I see dave[RUBY3/Book 14:04:31] ruby -v t.rb ruby 1.9.0 (2008-03-03 revision 15427) [i686-darwin9.2.0] # t.rb:1:in `foreach': closed stream (IOError) from t.rb:1:in `
' It looks like it's passing the file object instead. Dave