Branch: refs/heads/master Home: https://github.com/MacRuby/MacRuby Commit: d6bbfe30f5f640965e42fb8065116a386dda7be7 https://github.com/MacRuby/MacRuby/commit/d6bbfe30f5f640965e42fb8065116a386d... Author: Watson <watson1978@gmail.com> Date: 2011-05-12 (Thu, 12 May 2011) Changed paths: M io.c Log Message: ----------- fix a bug of IO.readlines (and family) which is broken when was passed argument of separator and limit. Test Script: {{{ require 'test/unit/assertions.rb' include Test::Unit::Assertions File.open("/tmp/foo", "w") {|f| f.puts "foo" f.puts "bar" } ary = IO.readlines("/tmp/foo", "\n", 10) assert_equal(["foo\n", "bar\n"], ary) puts :ok }}} Commit: ccb885dd3dcef02deda6bcc9480acbc07719c34a https://github.com/MacRuby/MacRuby/commit/ccb885dd3dcef02deda6bcc9480acbc077... Author: Watson <watson1978@gmail.com> Date: 2011-05-12 (Thu, 12 May 2011) Changed paths: M io.c Log Message: ----------- IO.readlines (and family) will accept an Object which has a to_str method as separator. Test Script: {{{ require 'test/unit/assertions.rb' include Test::Unit::Assertions File.open("/tmp/foo", "w") {|f| f.puts "foo" f.puts "bar" } sep = Object.new def sep.to_str; "\n"; end ary = IO.readlines("/tmp/foo", sep, 10) assert_equal(["foo\n", "bar\n"], ary) puts :ok }}} Compare: https://github.com/MacRuby/MacRuby/compare/327228c...ccb885d