mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/psych/lib/psych/scalar_scanner.rb: invalid floats should be
treated as strings. [Fixes GH-156] https://github.com/tenderlove/psych/issues/156 * test/psych/test_string.rb: test for change git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
806ddf6713
commit
48602d1dbf
3 changed files with 14 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Thu Aug 29 02:40:45 2013 Aaron Patterson <aaron@tenderlovemaking.com>
|
||||||
|
|
||||||
|
* ext/psych/lib/psych/scalar_scanner.rb: invalid floats should be
|
||||||
|
treated as strings.
|
||||||
|
[Fixes GH-156] https://github.com/tenderlove/psych/issues/156
|
||||||
|
|
||||||
|
* test/psych/test_string.rb: test for change
|
||||||
|
|
||||||
Wed Aug 28 17:20:07 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Aug 28 17:20:07 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* thread_pthread.c (hpux_attr_getstackaddr): basic support for the
|
* thread_pthread.c (hpux_attr_getstackaddr): basic support for the
|
||||||
|
|
|
@ -95,7 +95,7 @@ module Psych
|
||||||
end
|
end
|
||||||
i
|
i
|
||||||
when FLOAT
|
when FLOAT
|
||||||
if string == '.'
|
if string =~ /\A[-+]?\.\Z/
|
||||||
@string_cache[string] = true
|
@string_cache[string] = true
|
||||||
string
|
string
|
||||||
else
|
else
|
||||||
|
|
|
@ -15,6 +15,11 @@ module Psych
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_dash_dot
|
||||||
|
assert_cycle '-.'
|
||||||
|
assert_cycle '+.'
|
||||||
|
end
|
||||||
|
|
||||||
def test_string_subclass_with_anchor
|
def test_string_subclass_with_anchor
|
||||||
y = Psych.load <<-eoyml
|
y = Psych.load <<-eoyml
|
||||||
---
|
---
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue