diff options
author | Florian Frank <flori@ping.de> | 2010-04-08 09:09:19 +0200 |
---|---|---|
committer | Florian Frank <flori@ping.de> | 2010-04-08 09:12:52 +0200 |
commit | 207c895f1e28cfb12c846174fa99ae79575369b4 (patch) | |
tree | 120e909b15078c4ec3a2ce10ec538874a9423339 /lib/json/common.rb | |
parent | a294a83f4d22901651d09c06063eb20d3b2290b8 (diff) | |
download | json-v1.2.tar.gz |
Diffstat (limited to 'lib/json/common.rb')
-rw-r--r-- | lib/json/common.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/json/common.rb b/lib/json/common.rb index 3ce25c1..c9ee0a1 100644 --- a/lib/json/common.rb +++ b/lib/json/common.rb @@ -38,9 +38,9 @@ module JSON when c.empty? then p when p.const_defined?(c) then p.const_get(c) else - if (c = p.const_missing(c) rescue nil) - c - else + begin + p.const_missing(c) + rescue NameError raise ArgumentError, "can't find const #{path}" end end |