From 8662841a9b48bfaa3506eb93c47ceabe88e7f488 Mon Sep 17 00:00:00 2001 From: tenderlove Date: Fri, 29 Aug 2014 21:24:33 +0000 Subject: * 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 --- test/psych/test_string.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/psych') diff --git a/test/psych/test_string.rb b/test/psych/test_string.rb index f1f061b305..1ce16fdf3e 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 -- cgit v1.2.3