提交 490a3335 编写于 作者: C Cezary Baginski 提交者: Jeremy Kemper

Action Pack: fix tests with -K*, work around Ruby 1.9.1 constant lookup.

[#4473 state:committed]
Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
上级 8ec085bf
......@@ -25,7 +25,7 @@ def data
end
def multibyte_text_data
send_data("Кирилица\n祝您好運", options)
send_data("Кирилица\n祝您好運.", options)
end
end
......@@ -128,7 +128,7 @@ def test_send_file_headers_with_mime_lookup_with_symbol
assert_equal 'image/png', @controller.content_type
end
def test_send_file_headers_with_bad_symbol
options = {
......
......@@ -237,8 +237,8 @@ def call(env)
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
......
......@@ -72,8 +72,8 @@ class Chars
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']
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册