Skip to content

Commit

Permalink
Stop using #each_with_object to maintain 1.8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Sep 26, 2013
1 parent 3bd4bcd commit 8f800db
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/opal/parser.rb
Expand Up @@ -1248,12 +1248,14 @@ def arity_check(args, opt, splat, block_name, mid)
end

def process_args(exp, level)
args = exp.each_with_object([]) do |a, obj|
args = []

exp.each do |a|
a = a.to_sym
next if a.to_s == '*'
a = lvar_to_js a
@scope.add_arg a
obj << a
args << a
end

f(args.join(', '), exp)
Expand Down

0 comments on commit 8f800db

Please sign in to comment.