Skip to content

Commit

Permalink
bench fix for broken Array#reject!
Browse files Browse the repository at this point in the history
  • Loading branch information
burningTyger committed Mar 14, 2011
1 parent 7f7bd17 commit 5340263
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion benchmark/core/array/bench_reject.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
require File.expand_path('../shared_array.rb', __FILE__)

Benchmark.ips do |x|

large_array = $large_array.dup

x.report "reject all" do |times|
Expand All @@ -25,6 +24,7 @@
x.report "reject! all" do |times|
i = 0
while i < times
large_array = $large_array.dup
large_array.reject! { |v| true }
i += 1
end
Expand All @@ -37,4 +37,5 @@
i += 1
end
end

end

0 comments on commit 5340263

Please sign in to comment.