Skip to content

Commit 0429284

Browse files
committed
Remove redundant String#dup
Since no destructive methods are being called, `dup` isn’t necessary.
1 parent 47c70ef commit 0429284

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mcp/string_utils.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def demodulize(path)
1515
end
1616

1717
def underscore(camel_cased_word)
18-
camel_cased_word.dup
18+
camel_cased_word
1919
.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
2020
.gsub(/([a-z\d])([A-Z])/, '\1_\2')
2121
.tr("-", "_")

0 commit comments

Comments
 (0)