summaryrefslogtreecommitdiff
path: root/ext/json/ext/parser/parser.c
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2011-12-20 23:05:15 +0100
committerFlorian Frank <flori@ping.de>2011-12-20 23:05:15 +0100
commitaa7feb07b68e13ce2e024669873a8a6a89f304dc (patch)
tree6c11497c2c6e417cbb56705fb96c7366e6fc58fb /ext/json/ext/parser/parser.c
parentdec1286737e8d9c3d61ec9f6726a88d65592f48e (diff)
downloadjson-aa7feb07b68e13ce2e024669873a8a6a89f304dc.tar.gz
Support duck typed ruby array in JRuby as well
Diffstat (limited to 'ext/json/ext/parser/parser.c')
-rw-r--r--ext/json/ext/parser/parser.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/json/ext/parser/parser.c b/ext/json/ext/parser/parser.c
index e262f09..c572a95 100644
--- a/ext/json/ext/parser/parser.c
+++ b/ext/json/ext/parser/parser.c
@@ -445,12 +445,12 @@ case 26:
if (cs >= JSON_object_first_final) {
if (json->create_additions) {
- VALUE klassname;
+ VALUE klassname;
if (NIL_P(json->object_class)) {
- klassname = rb_hash_aref(*result, json->create_id);
- } else {
- klassname = rb_funcall(*result, i_aref, 1, json->create_id);
- }
+ klassname = rb_hash_aref(*result, json->create_id);
+ } else {
+ klassname = rb_funcall(*result, i_aref, 1, json->create_id);
+ }
if (!NIL_P(klassname)) {
VALUE klass = rb_funcall(mJSON, i_deep_const_get, 1, klassname);
if (RTEST(rb_funcall(klass, i_json_creatable_p, 0))) {