Skip to content

Commit 8f800db

Browse files
committed
Stop using #each_with_object to maintain 1.8 support
1 parent 3bd4bcd commit 8f800db

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/opal/parser.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,12 +1248,14 @@ def arity_check(args, opt, splat, block_name, mid)
12481248
end
12491249

12501250
def process_args(exp, level)
1251-
args = exp.each_with_object([]) do |a, obj|
1251+
args = []
1252+
1253+
exp.each do |a|
12521254
a = a.to_sym
12531255
next if a.to_s == '*'
12541256
a = lvar_to_js a
12551257
@scope.add_arg a
1256-
obj << a
1258+
args << a
12571259
end
12581260

12591261
f(args.join(', '), exp)

0 commit comments

Comments
 (0)