テストをつけようということで、[ruby-core:3742] に対しては次のようなテ
ストを加えるのはどうでしょうか。
Index: test/ruby/test_string.rb
===================================================================
RCS file: /src/ruby/test/ruby/test_string.rb,v
retrieving revision 1.2
diff -u -p -r1.2 test_string.rb
--- test/ruby/test_string.rb 3 Oct 2004 06:09:49 -0000 1.2
+++ test/ruby/test_string.rb 15 Nov 2004 23:23:59 -0000
@@ -16,4 +16,12 @@ class TestString < Test::Unit::TestCase
check_sum("xyz", bits)
}
end
+
+ def test_each_line
+ result = []
+ "a\nb".freeze.each_line {|l|
+ result << l
+ }
+ assert_equal(["a\n", "b"], result, "ruby-core:3742")
+ end
end
--
[田中 哲][たなか あきら][Tanaka Akira]