Created
June 20, 2011 23:40
-
-
Save itochan/1036885 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# coding: utf-8 | |
require "benchmark" | |
case ARGV[0].to_i | |
# 既存の(ruby 1.9.2p180)cgi | |
when 0 then require "cgi/util" | |
# このパッチを適用したcgi | |
when 1 then require "./ruby/lib/cgi/util" | |
end | |
str = "テストtest >< 2×2=4 2÷2=1" | |
puts Benchmark::CAPTION | |
puts Benchmark.measure { | |
10000.times do | |
$unescapestr = CGI.unescapeHTML(str); | |
end | |
} | |
puts $unescapestr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment