Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ruby/strscan] Prevent a warning "ambiguous first argument" during a
Browse files Browse the repository at this point in the history
test
(ruby/strscan#118)

https://rubyci.s3.amazonaws.com/debian11/ruby-master/log/20241128T153002Z.log.html.gz
```
/home/chkbuild/chkbuild/tmp/build/20241128T153002Z/ruby/test/strscan/test_stringscanner.rb:908: warning: ambiguous first argument; put parentheses or a space even after `-` operator
```

ruby/strscan@af3fd2f045
mame authored and hsbt committed Dec 2, 2024

Unverified

This user has not yet uploaded their public signing key.
1 parent 0fe82ae commit 5dcb8de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/strscan/test_stringscanner.rb
Original file line number Diff line number Diff line change
@@ -905,7 +905,7 @@ def test_scan_integer
assert_predicate s, :matched?

s = create_string_scanner('-123abc')
assert_equal -123, s.scan_integer
assert_equal(-123, s.scan_integer)
assert_equal 4, s.pos
assert_predicate s, :matched?

0 comments on commit 5dcb8de

Please sign in to comment.