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-02 21:13:45 +0100
commit52cab32644a0f77ffa7653232f79724b33f19050 (patch)
treea8e24b842ca917dce9a6c02a5bf54b67a33db676 /lib/json/ext.rb
parenta424e80b9666645e0ab9d1f44f6fe6e1e2adb865 (diff)
downloadjson-52cab32644a0f77ffa7653232f79724b33f19050.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