Skip to content

Conversation

@pvdb
Copy link
Contributor

@pvdb pvdb commented Oct 29, 2025

Running rake test on the master branch outputs the following Ruby syntax warning:

.../test/test_rake_rake_test_loader.rb:57:
warning: ambiguous `/`; wrap regexp in parentheses or add a space after `/` operator

Wrapping the assert_match() arguments in parentheses fixes the ambiguity, and - what's more - makes the assertion syntax consistent with similar assertions throughout the rake codebase #consistency_ftw 🎉

before:

$ ruby -w -c test/test_rake_rake_test_loader.rb
test/test_rake_rake_test_loader.rb:57: warning: ambiguous `/`; wrap regexp in parentheses or add a space after `/` operator
Syntax OK
$ _

after:

$ ruby -w -c test/test_rake_rake_test_loader.rb
Syntax OK
$ _

@pvdb pvdb changed the title refactor: fix Ruby warning about ambiguous regexp / assertion in one of the test refactor: fix Ruby warning about ambiguous regexp / assertion in one of the tests Oct 29, 2025
@pvdb pvdb changed the title refactor: fix Ruby warning about ambiguous regexp / assertion in one of the tests refactor: fix ambiguous regexp / assertion in one of the tests Oct 29, 2025
@hsbt
Copy link
Member

hsbt commented Oct 29, 2025

👍 Thanks!

@hsbt hsbt merged commit 276e38c into ruby:master Oct 29, 2025
39 checks passed
@pvdb pvdb deleted the fix_ruby_warning_in_test branch October 30, 2025 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants