diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-22 16:11:15 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-09-27 11:19:20 -0300 |
commit | 5d773f8dedef85f3ef5d3bdebcedd72716002268 (patch) | |
tree | 6051c353ec7258013e864bd56ba443d13b95d178 /actionpack/lib/action_controller/test_case.rb | |
parent | 535371e956b648daff80b1c727b609749ac7137b (diff) | |
download | rails-5d773f8dedef85f3ef5d3bdebcedd72716002268.tar.gz rails-5d773f8dedef85f3ef5d3bdebcedd72716002268.tar.bz2 rails-5d773f8dedef85f3ef5d3bdebcedd72716002268.zip |
Remove warning "URI.unescape is obsolete" from actionpack.
Diffstat (limited to 'actionpack/lib/action_controller/test_case.rb')
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index f5ae1c3fff..eeffce1612 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -127,7 +127,11 @@ module ActionController class Result < ::Array #:nodoc: def to_s() join '/' end def self.new_escaped(strings) - new strings.collect {|str| URI.unescape str} + new strings.collect {|str| uri_parser.unescape str} + end + + def uri_parser + @uri_parser ||= URI.const_defined?(:Parser) ? URI::Parser.new : URI end end |