Skip to content
This repository has been archived by the owner on Nov 2, 2019. It is now read-only.

Commit

Permalink
Preset locals to nil.
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed Nov 12, 2011
1 parent 798fae0 commit baebbd4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions runtime/01_ruby.js
Expand Up @@ -1165,6 +1165,11 @@ var $ = {
throw new Error("argument " + i + " (" + args[i] + ") does not look like Ruby object");
}

if(iseq.info.local_size !== undefined) {
for(var i = 2; i <= iseq.info.local_size; i++)
new_sf.locals[i] = Qnil;
}

if(typeof iseq == 'object') {
var argsinfo = iseq.info.args;
var optarg_count = argsinfo.opt_jumptable ? argsinfo.opt_jumptable.length - 1 : 0;
Expand Down

0 comments on commit baebbd4

Please sign in to comment.