Remove redundant String#dup

Since no destructive methods are being called, `dup` isn’t necessary.
This commit is contained in:
Koichi ITO 2025-12-14 14:32:10 +09:00
commit 0429284d5d

View file

@ -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("-", "_")