diff options
author | Cezary Baginski <cezary.baginski@gmail.com> | 2010-04-25 19:48:40 +0200 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-04-25 17:00:20 -0700 |
commit | 490a3335d56c124c8113aac0b63ad367f81bb450 (patch) | |
tree | 9afa343cab77240da525014e9b192f2b06bc18dd | |
parent | 8ec085bf1804770a547894967fcdee24087fda87 (diff) | |
download | rails-490a3335d56c124c8113aac0b63ad367f81bb450.tar.gz rails-490a3335d56c124c8113aac0b63ad367f81bb450.tar.bz2 rails-490a3335d56c124c8113aac0b63ad367f81bb450.zip |
Action Pack: fix tests with -K*, work around Ruby 1.9.1 constant lookup.
[#4473 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
-rw-r--r-- | actionpack/test/controller/send_file_test.rb | 4 | ||||
-rw-r--r-- | actionpack/test/dispatch/routing_test.rb | 4 | ||||
-rw-r--r-- | activesupport/lib/active_support/multibyte/chars.rb | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/test/controller/send_file_test.rb b/actionpack/test/controller/send_file_test.rb index 30c9a65b7c..36b8055810 100644 --- a/actionpack/test/controller/send_file_test.rb +++ b/actionpack/test/controller/send_file_test.rb @@ -25,7 +25,7 @@ class SendFileController < ActionController::Base end def multibyte_text_data - send_data("Кирилица\n祝您好運", options) + send_data("Кирилица\n祝您好運.", options) end end @@ -128,7 +128,7 @@ class SendFileTest < ActionController::TestCase assert_equal 'image/png', @controller.content_type end - + def test_send_file_headers_with_bad_symbol options = { diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index f67e403330..b508996467 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -237,8 +237,8 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest AltRoutes = ActionDispatch::Routing::RouteSet.new(AltRequest) AltRoutes.draw do - get "/" => XHeader.new, :constraints => {:x_header => /HEADER/} - get "/" => AltApp.new + get "/" => TestRoutingMapper::TestAltApp::XHeader.new, :constraints => {:x_header => /HEADER/} + get "/" => TestRoutingMapper::TestAltApp::AltApp.new end def app diff --git a/activesupport/lib/active_support/multibyte/chars.rb b/activesupport/lib/active_support/multibyte/chars.rb index 38007fd4e7..4ade1158fd 100644 --- a/activesupport/lib/active_support/multibyte/chars.rb +++ b/activesupport/lib/active_support/multibyte/chars.rb @@ -72,8 +72,8 @@ module ActiveSupport #:nodoc: def self.codepoints_to_pattern(array_of_codepoints) #:nodoc: array_of_codepoints.collect{ |e| [e].pack 'U*' }.join('|') end - UNICODE_TRAILERS_PAT = /(#{codepoints_to_pattern(UNICODE_LEADERS_AND_TRAILERS)})+\Z/ - UNICODE_LEADERS_PAT = /\A(#{codepoints_to_pattern(UNICODE_LEADERS_AND_TRAILERS)})+/ + UNICODE_TRAILERS_PAT = /(#{codepoints_to_pattern(UNICODE_LEADERS_AND_TRAILERS)})+\Z/u + UNICODE_LEADERS_PAT = /\A(#{codepoints_to_pattern(UNICODE_LEADERS_AND_TRAILERS)})+/u UTF8_PAT = ActiveSupport::Multibyte::VALID_CHARACTER['UTF-8'] |