1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test String#each_line when separator is longer than string.

Thanks Charles Nutter.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tenderlove 2012-08-07 00:43:44 +00:00
parent 28827e61d1
commit ac37fc37b1

View file

@ -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