From 6b80aa0fa039db7c95f930d311bb39c14c4a6531 Mon Sep 17 00:00:00 2001 From: hsbt Date: Wed, 7 Sep 2016 03:16:15 +0000 Subject: * ext/psych/*, test/psych/*: Update psych-2.1.1 This version fixed following pull requests. https://github.com/tenderlove/psych/pull/284 https://github.com/tenderlove/psych/pull/276 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/psych/test_scalar_scanner.rb | 4 ++++ test/psych/test_string.rb | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'test/psych') diff --git a/test/psych/test_scalar_scanner.rb b/test/psych/test_scalar_scanner.rb index 7ad18c557b..25999892bc 100644 --- a/test/psych/test_scalar_scanner.rb +++ b/test/psych/test_scalar_scanner.rb @@ -74,6 +74,10 @@ module Psych assert ss.tokenize('.nan').nan? end + def test_scan_float_with_exponent_but_no_fraction + assert_equal(0.0, ss.tokenize('0.E+0')) + end + def test_scan_null assert_equal nil, ss.tokenize('null') assert_equal nil, ss.tokenize('~') diff --git a/test/psych/test_string.rb b/test/psych/test_string.rb index 51aef40858..25c6353cee 100644 --- a/test/psych/test_string.rb +++ b/test/psych/test_string.rb @@ -99,6 +99,10 @@ module Psych assert_cycle '+.' end + def test_float_with_no_fractional_before_exponent + assert_cycle '0.E+0' + end + def test_string_subclass_with_anchor y = Psych.load <<-eoyml --- -- cgit v1.2.3