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 /activesupport/lib/active_support/inflector | |
parent | 0cc6c5fec235cca6d7eb85d4f849536db8566e93 (diff) | |
download | rails-2d8396fc9fbea9189e9e945e41e643925da5b2cb.tar.gz rails-2d8396fc9fbea9189e9e945e41e643925da5b2cb.tar.bz2 rails-2d8396fc9fbea9189e9e945e41e643925da5b2cb.zip |
Updated/changed useless tr/gsubs
Diffstat (limited to 'activesupport/lib/active_support/inflector')
-rw-r--r-- | activesupport/lib/active_support/inflector/methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/inflector/methods.rb b/activesupport/lib/active_support/inflector/methods.rb index 19a6c51516..54d3b4f5ca 100644 --- a/activesupport/lib/active_support/inflector/methods.rb +++ b/activesupport/lib/active_support/inflector/methods.rb @@ -77,7 +77,7 @@ module ActiveSupport # "SSLError".underscore.camelize # => "SslError" def underscore(camel_cased_word) word = camel_cased_word.to_s.dup - word.gsub!(/::/, '/') + word.gsub!('::', '/') word.gsub!(/(?:([A-Za-z\d])|^)(#{inflections.acronym_regex})(?=\b|[^a-z])/) { "#{$1}#{$1 && '_'}#{$2.downcase}" } word.gsub!(/([A-Z\d]+)([A-Z][a-z])/,'\1_\2') word.gsub!(/([a-z\d])([A-Z])/,'\1_\2') |