diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-29 23:57:25 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-29 23:57:25 +0000 |
commit | 797f482fe89cf9af1467fc0e7f0707d8c5e4141f (patch) | |
tree | 6b83b7cebe41aa848f237fed80ed8b0d626bc5fd /test/psych | |
parent | c294fcc0abe83bae433bc08b009db1d03b39e864 (diff) | |
download | ruby-797f482fe89cf9af1467fc0e7f0707d8c5e4141f.tar.gz |
* lib/psych.rb: Fix problem with empty and white-space only strings.
Thanks Peter McLain!
* test/psych/test_psych.rb: tests for change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/psych')
-rw-r--r-- | test/psych/test_psych.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/psych/test_psych.rb b/test/psych/test_psych.rb index fce070fa39..88fe83c19a 100644 --- a/test/psych/test_psych.rb +++ b/test/psych/test_psych.rb @@ -66,4 +66,11 @@ class TestPsych < Psych::TestCase assert_equal 'hello world', Psych.parse_file(name).transform end + + def test_degenerate_strings + assert_equal false, Psych.load(' ') + assert_equal false, Psych.parse(' ') + assert_equal false, Psych.load('') + assert_equal false, Psych.parse('') + end end |