зеркало из https://github.com/github/ruby.git
* 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
This commit is contained in:
Родитель
55f9cc806d
Коммит
67526f3090
|
@ -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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче