diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_string.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index 47f349cc18..bb0d9b04f9 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -647,6 +647,13 @@ class TestString < Test::Unit::TestCase assert_equal(S("hello!"), res[0]) assert_equal(S("world"), res[1]) + $/ = "ab" + + res=[] + S("a").lines.each {|x| res << x} + assert_equal(1, res.size) + assert_equal(S("a"), res[0]) + $/ = save s = nil |