Skip to content

Commit eb285e8

Browse files
casperisfinebyrootkou
authored
Fix "ambiguous first argument" warning in test suite (#189)
``` test/fiddle/test_pointer.rb:288: warning: ambiguous first argument; put parentheses or a space even after '-' operator ``` I noticed this in one of my ruby builds: https://github.com/ruby/ruby/actions/runs/14838247932/job/41654544867?pr=13159#step:8:1818 --------- Co-authored-by: Jean Boussier <jean.boussier@gmail.com> Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
1 parent c361587 commit eb285e8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/fiddle/test_pointer.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,11 @@ def test_null?
281281

282282
def test_size
283283
Pointer.malloc(4, Fiddle::RUBY_FREE) do |ptr|
284-
assert_equal 4, ptr.size
284+
assert_equal(4, ptr.size)
285285
end
286-
assert_equal 0, Pointer.new(0).size
287-
assert_equal 0, Pointer.new(0).ref.size
288-
assert_equal -1, (Pointer.new(0) + 1).size
286+
assert_equal(0, Pointer.new(0).size)
287+
assert_equal(0, Pointer.new(0).ref.size)
288+
assert_equal(-1, (Pointer.new(0) + 1).size)
289289
end
290290

291291
def test_size=

0 commit comments

Comments
 (0)