mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/psych/lib/psych/scalar_scanner.rb: use constants rather than
calculating Inf and NaN. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
66013dc6d0
commit
679a646e37
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Thu Jan 17 10:48:56 2013 Aaron Patterson <aaron@tenderlovemaking.com>
|
||||||
|
|
||||||
|
* ext/psych/lib/psych/scalar_scanner.rb: use constants rather than
|
||||||
|
calculating Inf and NaN.
|
||||||
|
|
||||||
Thu Jan 17 10:21:05 2013 Eric Hodel <drbrain@segment7.net>
|
Thu Jan 17 10:21:05 2013 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
* doc/syntax/miscellaneous.rdoc: Added Ending an Expression and
|
* doc/syntax/miscellaneous.rdoc: Added Ending an Expression and
|
||||||
|
|
|
@ -68,11 +68,11 @@ module Psych
|
||||||
string
|
string
|
||||||
end
|
end
|
||||||
when /^\.inf$/i
|
when /^\.inf$/i
|
||||||
1 / 0.0
|
Float::INFINITY
|
||||||
when /^-\.inf$/i
|
when /^-\.inf$/i
|
||||||
-1 / 0.0
|
-Float::INFINITY
|
||||||
when /^\.nan$/i
|
when /^\.nan$/i
|
||||||
0.0 / 0.0
|
Float::NAN
|
||||||
when /^:./
|
when /^:./
|
||||||
if string =~ /^:(["'])(.*)\1/
|
if string =~ /^:(["'])(.*)\1/
|
||||||
@symbol_cache[string] = $2.sub(/^:/, '').to_sym
|
@symbol_cache[string] = $2.sub(/^:/, '').to_sym
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue