Skip to content

Commit

Permalink
Fix sexp level when processing a wrapped begin; end block
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Oct 20, 2013
1 parent 1207c2c commit a0b3b74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/opal/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2288,7 +2288,7 @@ def process_rescue_mod(sexp, level)
# FIXME: Hack.. grammar should remove top level begin.
def process_begin(exp, level)
if level != :stmt and exp[0][0] == :block
[f("(function() {"), process(returns(exp[0]), level), f("})()")]
[f("(function() {"), process(returns(exp[0]), :stmt), f("})()")]
else
process exp[0], level
end
Expand Down

0 comments on commit a0b3b74

Please sign in to comment.