summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-01 17:35:30 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-01 17:35:30 +0000
commitd17fe8a46722912e9904982f89b3949b41acc68f (patch)
tree1949295cbd6126ba568c8b55b5dffb4575499a1a
parentd99ac4f829dd0903f20e02de5dbba0ddc175c1f3 (diff)
NaN is now 0.0/0 because of 1.8/1.9 compat.
* ext/json/lib/json/common.rb (NaN): Change definition of NaN to 0.0/0 for 1.8/1.9 compatibility. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rwxr-xr-xext/json/lib/json/common.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 91f7893..e95db1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Sep 2 02:32:46 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * ext/json/lib/json/common.rb (NaN): Change definition
+ of NaN to 0.0/0 for 1.8/1.9 compatibility.
+
Wed Sep 2 01:16:32 2009 NARUSE, Yui <naruse@ruby-lang.org>
* ext/json: Update to JSON 1.1.9.
diff --git a/ext/json/lib/json/common.rb b/ext/json/lib/json/common.rb
index 5f6b244..0df8a89 100755
--- a/ext/json/lib/json/common.rb
+++ b/ext/json/lib/json/common.rb
@@ -74,7 +74,7 @@ module JSON
end
self.create_id = 'json_class'
- NaN = (-1.0) ** 0.5
+ NaN = 0.0/0
Infinity = 1.0/0