Skip to content

Commit

Permalink
Make chomp! specs actually do some work.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Aug 24, 2011
1 parent 8754fb5 commit 749dfa3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/string/bench_chomp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,35 +38,35 @@
i += 1
end
end

x.report "chomp!, std separator, multiple EOL" do |times|
i = 0
while i < times
multiple_eol.chomp!
multiple_eol.dup.chomp!
i += 1
end
end

x.report "chomp!, std separator, no EOL" do |times|
i = 0
while i < times
no_eol.chomp!
no_eol.dup.chomp!
i += 1
end
end

x.report "chomp!, std separator, multiple LF" do |times|
i = 0
while i < times
multiple_lf.chomp!
multiple_lf.dup.chomp!
i += 1
end
end

x.report "chomp!, std separator, empty string" do |times|
i = 0
while i < times
empty_string.chomp!
empty_string.dup.chomp!
i += 1
end
end
Expand Down

0 comments on commit 749dfa3

Please sign in to comment.