Skip to content

Commit

Permalink
Action Pack: fix tests with -K*, work around Ruby 1.9.1 constant lookup.
Browse files Browse the repository at this point in the history
[#4473 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information
e2 authored and jeremy committed Apr 26, 2010
1 parent 8ec085b commit 490a333
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions actionpack/test/controller/send_file_test.rb
Expand Up @@ -25,7 +25,7 @@ def data
end

def multibyte_text_data
send_data("Кирилица\n祝您好運", options)
send_data("Кирилица\n祝您好運.", options)
end
end

Expand Down Expand Up @@ -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 = {
Expand Down
4 changes: 2 additions & 2 deletions actionpack/test/dispatch/routing_test.rb
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions activesupport/lib/active_support/multibyte/chars.rb
Expand Up @@ -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']

Expand Down

0 comments on commit 490a333

Please sign in to comment.