From 2d8396fc9fbea9189e9e945e41e643925da5b2cb Mon Sep 17 00:00:00 2001 From: Jurriaan Pruis Date: Tue, 3 Apr 2012 15:16:09 +0200 Subject: Updated/changed useless tr/gsubs --- activesupport/lib/active_support/inflector/methods.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support') 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') -- cgit v1.2.3