Merge pull request #200 from koic/remove_redundant_string_dup

Remove redundant `String#dup`
This commit is contained in:
Koichi ITO 2025-12-15 07:54:59 +09:00 • committed by GitHub
commit 0b70ef3d6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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