summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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