Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix html_escape benchmark

  • Loading branch information...
commit 2f0431d4139dcc2d8616f41d9cd18ecfde0fbd22 1 parent 45646ae
@tmm1 tmm1 authored vmg committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  benchmark/html_escape.rb
View
2  benchmark/html_escape.rb
@@ -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|
Please sign in to comment.
Something went wrong with that request. Please try again.