Skip to content
Browse files

Ruby 1.9: string is not enumerable, so #exclude? is not available

  • Loading branch information...
1 parent 3a79117 commit 7c4fb93ac30b03c512ba163c5444eced18f12171 @jeremy jeremy committed
Showing with 3 additions and 5 deletions.
  1. +3 −5 actionpack/lib/action_dispatch/routing/mapper.rb
View
8 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -1,5 +1,3 @@
-require 'active_support/core_ext/enumerable'
-
module ActionDispatch
module Routing
class Mapper
@@ -58,15 +56,15 @@ def extract_path_and_options(args)
[ normalize_path(path), options ]
end
-
+
# match "account" => "account#index"
def using_to_shorthand?(args, options)
args.empty? && options.present?
end
-
+
# match "account/overview"
def using_match_shorthand?(args, options)
- args.present? && options.except(:via).empty? && args.first.exclude?(":")
+ args.present? && options.except(:via).empty? && !args.first.include?(':')
end
def normalize_path(path)

0 comments on commit 7c4fb93

Please sign in to comment.
Something went wrong with that request. Please try again.