diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2011-12-23 17:36:13 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2011-12-23 17:36:13 -0800 |
commit | 9bbe2b800ed87d803a18888b84ba5b73faba2680 (patch) | |
tree | 703b933378ae556c949b9009df7d8ec7bb798a7d | |
parent | 547f32fee50f22e824fbdfb9e540b166fe273cda (diff) | |
parent | 77ed289609ff02b23b9d3c89aa0aeace8d8b280d (diff) | |
download | rails-9bbe2b800ed87d803a18888b84ba5b73faba2680.tar.gz rails-9bbe2b800ed87d803a18888b84ba5b73faba2680.tar.bz2 rails-9bbe2b800ed87d803a18888b84ba5b73faba2680.zip |
Merge pull request #4156 from nashby/to-sym-ruby-18
remove checking for non-empty string before calling to_sym
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 4d83c6dee1..2117cb76b5 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -1432,8 +1432,7 @@ module ActionDispatch end def action_path(name, path = nil) #:nodoc: - # Ruby 1.8 can't transform empty strings to symbols - name = name.to_sym if name.is_a?(String) && !name.empty? + name = name.to_sym if name.is_a?(String) path || @scope[:path_names][name] || name.to_s end |