diff options
Diffstat (limited to 'java/src/json/ext/Parser.rl')
-rw-r--r-- | java/src/json/ext/Parser.rl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/java/src/json/ext/Parser.rl b/java/src/json/ext/Parser.rl index e576b97..5c6f227 100644 --- a/java/src/json/ext/Parser.rl +++ b/java/src/json/ext/Parser.rl @@ -655,7 +655,11 @@ public class Parser extends RubyObject { fhold; fbreak; } else { - result.op_aset(context, lastName, res.result); + if (parser.objectClass.getName().equals("Hash")) { + result.callMethod(context, "[]=", new IRubyObject[] { lastName, res.result }); + } else { + result.op_aset(context, lastName, res.result); + } fexec res.p; } } |