summaryrefslogtreecommitdiff
path: root/test/psych
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-29 21:24:33 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-29 21:24:33 +0000
commit8662841a9b48bfaa3506eb93c47ceabe88e7f488 (patch)
treeb85ace7a8daea6a3fa65d62edc2e8f68aed6f13b /test/psych
parent73645bb8e55dad0526419c7e434746d042fdacc1 (diff)
* ext/psych/lib/psych/scalar_scanner.rb: fix loading strings that
look like integers but have a newline. Fixes GH #189 * test/psych/test_string.rb: test for fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/psych')
-rw-r--r--test/psych/test_string.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/psych/test_string.rb b/test/psych/test_string.rb
index f1f061b305f..1ce16fdf3ec 100644
--- a/test/psych/test_string.rb
+++ b/test/psych/test_string.rb
@@ -15,6 +15,10 @@ module Psych
end
end
+ def test_string_with_newline
+ assert_equal "1\n2", Psych.load("--- ! '1\n\n 2'\n")
+ end
+
def test_no_doublequotes_with_special_characters
assert_equal 2, Psych.dump(%Q{<%= ENV["PATH"] %>}).count('"')
end