Skip to content

Commit af3fd2f

Browse files
authored
Prevent a warning "ambiguous first argument" during a test (#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 ```
1 parent c02b1ce commit af3fd2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/strscan/test_stringscanner.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ def test_scan_integer
905905
assert_predicate s, :matched?
906906

907907
s = create_string_scanner('-123abc')
908-
assert_equal -123, s.scan_integer
908+
assert_equal(-123, s.scan_integer)
909909
assert_equal 4, s.pos
910910
assert_predicate s, :matched?
911911

0 commit comments

Comments
 (0)