diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-04-04 10:43:24 -0700 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-04-04 10:43:24 -0700 |
commit | a9398a7da4fa845a0182bd53273c607dae55b1ee (patch) | |
tree | d3b3f2f95a45ce19f10b774d6d07b41b318afa99 /activesupport/lib | |
parent | c6bd8a9d3ac2ebd5d0af4573d6d799085ac2219b (diff) | |
parent | 2d8396fc9fbea9189e9e945e41e643925da5b2cb (diff) | |
download | rails-a9398a7da4fa845a0182bd53273c607dae55b1ee.tar.gz rails-a9398a7da4fa845a0182bd53273c607dae55b1ee.tar.bz2 rails-a9398a7da4fa845a0182bd53273c607dae55b1ee.zip |
Merge pull request #5716 from jurriaan/tr-gsub-cleanup
Updated/changed unneeded tr/gsubs
Diffstat (limited to 'activesupport/lib')
-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') |