Skip to content

Commit

Permalink
fix html_escape benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 authored and vmg committed Feb 26, 2013
1 parent 45646ae commit 2f0431d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benchmark/html_escape.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module HamlBench
times = 100
url = "http://en.wikipedia.org/wiki/Line_of_succession_to_the_British_throne"
html = `curl -s #{url}`
html = html.force_encoding('binary') if html.respond_to?(:force_encoding)
html = html.force_encoding('utf-8') if html.respond_to?(:force_encoding)
puts "Escaping #{html.bytesize} bytes of html #{times} times, from #{url}"

Benchmark.bmbm do |x|
Expand Down

0 comments on commit 2f0431d

Please sign in to comment.