Skip to content

Commit

Permalink
faster path for Array.[]
Browse files Browse the repository at this point in the history
  • Loading branch information
timfel committed Feb 20, 2017
1 parent 18ce328 commit dbfff21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib-topaz/array.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def initialize(size_or_arr = nil, obj = nil, &block)
end

def self.[](*args)
args.inject(allocate) { |array, arg| array << arg}
allocate.concat(args)
end

def inspect
Expand Down

0 comments on commit dbfff21

Please sign in to comment.