mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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>
This commit is contained in:
parent
8ec085bf18
commit
490a3335d5
3 changed files with 6 additions and 6 deletions
|
@ -25,7 +25,7 @@ class SendFileController < ActionController::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def multibyte_text_data
|
def multibyte_text_data
|
||||||
send_data("Кирилица\n祝您好運", options)
|
send_data("Кирилица\n祝您好運.", options)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ class SendFileTest < ActionController::TestCase
|
||||||
|
|
||||||
assert_equal 'image/png', @controller.content_type
|
assert_equal 'image/png', @controller.content_type
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def test_send_file_headers_with_bad_symbol
|
def test_send_file_headers_with_bad_symbol
|
||||||
options = {
|
options = {
|
||||||
|
|
|
@ -237,8 +237,8 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
|
||||||
|
|
||||||
AltRoutes = ActionDispatch::Routing::RouteSet.new(AltRequest)
|
AltRoutes = ActionDispatch::Routing::RouteSet.new(AltRequest)
|
||||||
AltRoutes.draw do
|
AltRoutes.draw do
|
||||||
get "/" => XHeader.new, :constraints => {:x_header => /HEADER/}
|
get "/" => TestRoutingMapper::TestAltApp::XHeader.new, :constraints => {:x_header => /HEADER/}
|
||||||
get "/" => AltApp.new
|
get "/" => TestRoutingMapper::TestAltApp::AltApp.new
|
||||||
end
|
end
|
||||||
|
|
||||||
def app
|
def app
|
||||||
|
|
|
@ -72,8 +72,8 @@ module ActiveSupport #:nodoc:
|
||||||
def self.codepoints_to_pattern(array_of_codepoints) #:nodoc:
|
def self.codepoints_to_pattern(array_of_codepoints) #:nodoc:
|
||||||
array_of_codepoints.collect{ |e| [e].pack 'U*' }.join('|')
|
array_of_codepoints.collect{ |e| [e].pack 'U*' }.join('|')
|
||||||
end
|
end
|
||||||
UNICODE_TRAILERS_PAT = /(#{codepoints_to_pattern(UNICODE_LEADERS_AND_TRAILERS)})+\Z/
|
UNICODE_TRAILERS_PAT = /(#{codepoints_to_pattern(UNICODE_LEADERS_AND_TRAILERS)})+\Z/u
|
||||||
UNICODE_LEADERS_PAT = /\A(#{codepoints_to_pattern(UNICODE_LEADERS_AND_TRAILERS)})+/
|
UNICODE_LEADERS_PAT = /\A(#{codepoints_to_pattern(UNICODE_LEADERS_AND_TRAILERS)})+/u
|
||||||
|
|
||||||
UTF8_PAT = ActiveSupport::Multibyte::VALID_CHARACTER['UTF-8']
|
UTF8_PAT = ActiveSupport::Multibyte::VALID_CHARACTER['UTF-8']
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue