Skip to content

Commit 548e82a

Browse files
committed
Performance fix.
1 parent f394de3 commit 548e82a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/core/array.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,7 @@ def ==(other)
201201

202202
def self.[](*elements)
203203
a = self.new
204-
elements.each do |e|
205-
a << e
206-
end
204+
a.concat(elements)
207205
a
208206
end
209207

0 commit comments

Comments
 (0)