summaryrefslogtreecommitdiff
path: root/ext/json/lib/json/add
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-20 17:57:51 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-20 17:57:51 +0000
commit67526f30909c255d164d5c14d944eeda77d8d92a (patch)
tree55f3924841adb88fe695bf68d21e5221265d6241 /ext/json/lib/json/add
parent55f9cc806df9d9f58917992e35e9c0ecf20e455e (diff)
* ext/json/ext/parser/parse.c: use ruby_xfree().
* ext/json/ext/parser/parse.rl: ditto. * ext/json/ext/parser/unicode.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/json/lib/json/add')
-rw-r--r--ext/json/lib/json/add/core.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/json/lib/json/add/core.rb b/ext/json/lib/json/add/core.rb
index 4423e7ad75..7121a77ff1 100644
--- a/ext/json/lib/json/add/core.rb
+++ b/ext/json/lib/json/add/core.rb
@@ -96,7 +96,7 @@ class Struct
def to_json(*args)
klass = self.class.name
- klass.to_s.empty? and raise JSON::JSONError, "Only named structs are supported!"
+ klass.nil? and raise JSON::JSONError, "Only named structs are supported!"
{
'json_class' => klass,
'v' => values,