summaryrefslogtreecommitdiff
path: root/lib/json/ext.rb
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2010-12-31 19:09:14 +0100
committerFlorian Frank <flori@ping.de>2011-01-01 20:04:23 +0100
commit88a8940f0bcc0658b99d14e5535ad3011b2fe82b (patch)
treea8e24b842ca917dce9a6c02a5bf54b67a33db676 /lib/json/ext.rb
parent472f52664eb529ddf3877abbc432739a067fd7c2 (diff)
downloadjson-88a8940f0bcc0658b99d14e5535ad3011b2fe82b.tar.gz
Fix for ruby 1.9 const_defined? method
ruby 1.9 breaks backwards compatibility by usіng the wrong default value for its newly introduced second argument. This patch implements a work around, to make this gem work on both ruby 1.8 and 1.9.
Diffstat (limited to 'lib/json/ext.rb')
-rw-r--r--lib/json/ext.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/json/ext.rb b/lib/json/ext.rb
index a5e3148..7264a85 100644
--- a/lib/json/ext.rb
+++ b/lib/json/ext.rb
@@ -11,5 +11,5 @@ module JSON
JSON.generator = Generator
end
- JSON_LOADED = true unless const_defined?(:JSON_LOADED)
+ JSON_LOADED = true unless defined?(::JSON::JSON_LOADED)
end