Remove redundant String#dup
Since no destructive methods are being called, `dup` isn’t necessary.
This commit is contained in:
parent
47c70ef8e7
commit
0429284d5d
1 changed files with 1 additions and 1 deletions
|
|
@ -15,7 +15,7 @@ module MCP
|
|||
end
|
||||
|
||||
def underscore(camel_cased_word)
|
||||
camel_cased_word.dup
|
||||
camel_cased_word
|
||||
.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
|
||||
.gsub(/([a-z\d])([A-Z])/, '\1_\2')
|
||||
.tr("-", "_")
|
||||
|
|
|
|||
Loading…
Reference in a new issue