Skip to content

refactor: fix ambiguous regexp / assertion in one of the tests - #667

Merged
hsbt merged 1 commit into
ruby:masterfrom
pvdb:fix_ruby_warning_in_test
Oct 29, 2025
Merged

refactor: fix ambiguous regexp / assertion in one of the tests#667
hsbt merged 1 commit into
ruby:masterfrom
pvdb:fix_ruby_warning_in_test

Conversation

@pvdb

@pvdbpvdb commented Oct 29, 2025

Copy link
Copy Markdown
Contributor

releasedrefactor: fix ambiguous regexp / assertion in one of the tests


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
$ _

@pvdbpvdb changed the title refactor: fix Ruby warning about ambiguous regexp / assertion in one of the testrefactor: fix Ruby warning about ambiguous regexp / assertion in one of the testsOct 29, 2025
@pvdbpvdb changed the title refactor: fix Ruby warning about ambiguous regexp / assertion in one of the testsrefactor: fix ambiguous regexp / assertion in one of the testsOct 29, 2025
@hsbt

hsbt commented Oct 29, 2025

Copy link
Copy Markdown
Member

👍 Thanks!

@hsbt
hsbt merged commit 276e38c into ruby:masterOct 29, 2025
39 checks passed
@pvdb
pvdb deleted the fix_ruby_warning_in_test branch October 30, 2025 08:51
Sign up for freeto 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

@pvdb@hsbt