diff options
author | Jurriaan Pruis <email@jurriaanpruis.nl> | 2012-04-03 15:16:09 +0200 |
---|---|---|
committer | Jurriaan Pruis <email@jurriaanpruis.nl> | 2012-04-03 15:16:09 +0200 |
commit | 2d8396fc9fbea9189e9e945e41e643925da5b2cb (patch) | |
tree | 9185737cf020abf95ab2bad80c1bdc281c441808 /actionpack/lib/action_dispatch | |
parent | 0cc6c5fec235cca6d7eb85d4f849536db8566e93 (diff) | |
download | rails-2d8396fc9fbea9189e9e945e41e643925da5b2cb.tar.gz rails-2d8396fc9fbea9189e9e945e41e643925da5b2cb.tar.bz2 rails-2d8396fc9fbea9189e9e945e41e643925da5b2cb.zip |
Updated/changed useless tr/gsubs
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/testing/assertions/response.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index fccbff1749..ba4cfb482d 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -244,7 +244,7 @@ module ActionDispatch end def self.normalize_name(name) - normalize_path(name)[1..-1].gsub("/", "_") + normalize_path(name)[1..-1].tr("/", "_") end module Base @@ -441,7 +441,7 @@ module ActionDispatch app.railtie_name else class_name = app.class.is_a?(Class) ? app.name : app.class.name - ActiveSupport::Inflector.underscore(class_name).gsub("/", "_") + ActiveSupport::Inflector.underscore(class_name).tr("/", "_") end end diff --git a/actionpack/lib/action_dispatch/testing/assertions/response.rb b/actionpack/lib/action_dispatch/testing/assertions/response.rb index bea54f9778..7ac5f1d0e8 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/response.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/response.rb @@ -83,7 +83,7 @@ module ActionDispatch refer else @controller.url_for(fragment) - end.gsub(/[\0\r\n]/, '') + end.delete("\0\r\n") end end end |