Skip to content

Commit 41fbf05

Browse files
authored
Merge pull request #553 from koic/suppress_rubocop_offense
Fix a redundant regexp escape in the tool name validation
2 parents 7d7a566 + 99ef873 commit 41fbf05

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/mcp/tool.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def validate!
149149
raise ArgumentError, "Tool names should be between 1 and 128 characters in length (inclusive)."
150150
end
151151

152-
unless tool_name.match?(/\A[A-Za-z\d_\-\.]+\z/)
152+
unless tool_name.match?(/\A[A-Za-z\d_\-.]+\z/)
153153
raise ArgumentError, <<~MESSAGE
154154
Tool names only allowed characters: uppercase and lowercase ASCII letters (A-Z, a-z), digits (0-9), underscore (_), hyphen (-), and dot (.).
155155
MESSAGE

0 commit comments

Comments
 (0)