diff options
Diffstat (limited to 'ext/psych')
-rw-r--r-- | ext/psych/lib/psych/scalar_scanner.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/psych/lib/psych/scalar_scanner.rb b/ext/psych/lib/psych/scalar_scanner.rb index 7a9bb87cbd..068fc0e3cf 100644 --- a/ext/psych/lib/psych/scalar_scanner.rb +++ b/ext/psych/lib/psych/scalar_scanner.rb @@ -95,7 +95,7 @@ module Psych end i when FLOAT - if string == '.' + if string =~ /\A[-+]?\.\Z/ @string_cache[string] = true string else |