From 7d263c8547a2dd23c49666e2fb7dff1f3804e836 Mon Sep 17 00:00:00 2001 From: naruse Date: Sat, 20 Sep 2008 17:57:51 +0000 Subject: * 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: http://svn.ruby-lang.org/repos/ruby/trunk@19438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/json/lib/json/add/core.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/json/lib/json/add/core.rb b/ext/json/lib/json/add/core.rb index 4423e7ad7..7121a77ff 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, -- cgit