Skip to content

Commit

Permalink
Prevent a warning "ambiguous first argument" during a test (#118)
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
mame authored Nov 29, 2024
1 parent c02b1ce commit af3fd2f
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
Expand Up @@ -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?

Expand Down

0 comments on commit af3fd2f

Please sign in to comment.