Skip to content

Conversation

Watson1978
Copy link
Contributor

Which issue(s) this PR fixes:
Fixes #

What this PR does / why we need it:
This patch will suppress following warnings:

$ ruby -w -I"lib:test" test/plugin/test_out_http.rb
test/plugin/test_out_http.rb:445: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator
test/plugin/test_out_http.rb:446: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator
test/plugin/test_out_http.rb:482: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator
test/plugin/test_out_http.rb:483: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator

Seems we will see this warning If we omit the parentheses in the method and pass a regular expression as an argument.

irb(main):001> $VERBOSE=true
=> true
irb(main):002> p /m/
(irb):2: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator
/m/
=> /m/

Docs Changes:

Release Note:

This patch will suppress following warnings:
```
$ ruby -w -I"lib:test" test/plugin/test_out_http.rb
test/plugin/test_out_http.rb:445: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator
test/plugin/test_out_http.rb:446: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator
test/plugin/test_out_http.rb:482: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator
test/plugin/test_out_http.rb:483: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator
```

Seems we will see this warning If we omit the parentheses in the method and pass a regular expression as an argument.

```
irb(main):001> $VERBOSE=true
=> true
irb(main):002> p /m/
(irb):2: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator
/m/
=> /m/
```

Signed-off-by: Watson <watson1978@gmail.com>
Copy link
Contributor

@daipom daipom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@daipom daipom added this to the v1.17.1 milestone Aug 15, 2024
@daipom daipom added the backport to v1.16 We will backport this fix to the LTS branch label Aug 15, 2024
@daipom daipom merged commit ebdfab3 into fluent:master Aug 15, 2024
@Watson1978 Watson1978 deleted the parenthesis branch August 15, 2024 05:54
@daipom daipom removed the backport to v1.16 We will backport this fix to the LTS branch label Aug 15, 2024
@daipom
Copy link
Contributor

daipom commented Aug 15, 2024

These tests are for sigv4 feature, which is added in v1.17.0:

So, we don't need to backport this.

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