summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_string.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index e88746dc55..b0c6e447eb 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -1119,6 +1119,10 @@ CODE
res = []
S("\r\n").each_line(chomp: true) {|x| res << x}
assert_equal([S("")], res)
+
+ res = []
+ S("a\n b\n").each_line(" ", chomp: true) {|x| res << x}
+ assert_equal([S("a\n"), S("b\n")], res)
end
def test_lines