1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/fiddle] test: suppress a warning

test/fiddle/test_import.rb:138: warning:
    ambiguous first argument; put parentheses or a space even after `-' operator

https://github.com/ruby/fiddle/commit/060eef76ad
This commit is contained in:
Sutou Kouhei 2022-09-14 12:51:40 +09:00 committed by Hiroshi SHIBATA
parent 0097c7f388
commit 191b91f47a

View file

@ -135,7 +135,8 @@ module Fiddle
# for backwards compatibility
def test_unsigned_equals_negative_signed
Fiddle.constants.grep(/\ATYPE_(?!VOID|VARIADIC\z)(U.*)/) do |unsigned|
assert_equal -Fiddle.const_get(unsigned.to_s.sub(/U/, '')), Fiddle.const_get(unsigned)
assert_equal(-Fiddle.const_get(unsigned.to_s.sub(/U/, '')),
Fiddle.const_get(unsigned))
end
end