Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch jruby utf-8 method naming, fixes #1507 #1508

Merged
merged 2 commits into from Nov 30, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions padrino-core/lib/padrino-core/application/routing.rb
Expand Up @@ -15,6 +15,19 @@ def action
end end
end end


##
# This patches Sinatra to accept UTF-8 urls on JRuby 1.7.6
#
if RUBY_ENGINE == 'jruby' && defined?(JRUBY_VERSION) && JRUBY_VERSION > '1.7.4'
class Sinatra::Base
class << self
alias_method :old_generate_method, :generate_method
def generate_method(method_name, &block)
old_generate_method(method_name.to_sym, &block)
end
end
end
end


class HttpRouter class HttpRouter
def rewrite_partial_path_info(env, request); end def rewrite_partial_path_info(env, request); end
Expand Down