summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2024-04-04 13:23:52 +0900
committerYusuke Endoh <mame@ruby-lang.org>2024-04-04 13:29:41 +0900
commitfc67091fc8dc4c7122499cd0d287cd34ff01bf30 (patch)
tree6e4aadc2cc82605701d7bcfd42b743628a22b7a4 /test/ruby
parentf057741c5dd6fdc25926c2f16fc6e936eeec5fd1 (diff)
Prevent "ambiguous first argument" warnings
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/enc/test_case_options.rb4
-rw-r--r--test/ruby/test_string.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/test/ruby/enc/test_case_options.rb b/test/ruby/enc/test_case_options.rb
index 40a85ee970..e9c81d804e 100644
--- a/test/ruby/enc/test_case_options.rb
+++ b/test/ruby/enc/test_case_options.rb
@@ -19,7 +19,7 @@ class TestCaseOptions < Test::Unit::TestCase
def assert_raise_both_types(*options)
assert_raise_functional_operations 'a', *options
- assert_raise_bang_operations +'a', *options
+ assert_raise_bang_operations(+'a', *options)
assert_raise_functional_operations :a, *options
end
@@ -51,7 +51,7 @@ class TestCaseOptions < Test::Unit::TestCase
def assert_okay_both_types(*options)
assert_okay_functional_operations 'a', *options
- assert_okay_bang_operations +'a', *options
+ assert_okay_bang_operations(+'a', *options)
assert_okay_functional_operations :a, *options
end
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index 0dae1c5a8e..9ff3791e7d 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -3620,11 +3620,11 @@ CODE
assert_predicate chilled_string.clone, :frozen?
# @+ treat the original string as frozen
- assert_not_predicate +chilled_string, :frozen?
+ assert_not_predicate(+chilled_string, :frozen?)
assert_not_same chilled_string, +chilled_string
# @- the original string as mutable
- assert_predicate -chilled_string, :frozen?
+ assert_predicate(-chilled_string, :frozen?)
assert_not_same chilled_string, -chilled_string
end