diff options
Diffstat (limited to 'lib/ohai/mixin/string.rb')
-rw-r--r-- | lib/ohai/mixin/string.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ohai/mixin/string.rb b/lib/ohai/mixin/string.rb index 6f1e4da9..48830a36 100644 --- a/lib/ohai/mixin/string.rb +++ b/lib/ohai/mixin/string.rb @@ -23,7 +23,7 @@ class String # This should implement the same functionality as underscore method in # ActiveSupport::CoreExtensions::String::Inflections def wmi_underscore - self.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). - gsub(/([a-z\d])([A-Z])/,'\1_\2').tr("-", "_").downcase + self.gsub(/::/, "/").gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2'). + gsub(/([a-z\d])([A-Z])/, '\1_\2').tr("-", "_").downcase end end |