File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1085,10 +1085,11 @@ def test_args_CALL_1
10851085 end
10861086 end
10871087
1088+ OF_NIL_INTO_INTEGER = RUBY_VERSION < "4.1." ? "from nil to integer" : "of nil into Integer"
10881089 def test_args_CALL_2
10891090 v = [ ]
10901091 assert_error_message ( TypeError , <<~END ) do
1091- no implicit conversion from nil to integer (TypeError)
1092+ no implicit conversion #{ OF_NIL_INTO_INTEGER } (TypeError)
10921093
10931094 v[nil]
10941095 ^^^
@@ -1115,7 +1116,7 @@ def test_args_ATTRASGN_1
11151116 def test_args_ATTRASGN_2
11161117 v = [ ]
11171118 assert_error_message ( TypeError , <<~END ) do
1118- no implicit conversion from nil to integer (TypeError)
1119+ no implicit conversion #{ OF_NIL_INTO_INTEGER } (TypeError)
11191120
11201121 v [nil] = 1
11211122 ^^^^^^^^
@@ -1177,7 +1178,7 @@ def test_args_OP_ASGN1_aref_1
11771178 v = [ ]
11781179
11791180 assert_error_message ( TypeError , <<~END ) do
1180- no implicit conversion from nil to integer (TypeError)
1181+ no implicit conversion #{ OF_NIL_INTO_INTEGER } (TypeError)
11811182
11821183 v [nil] += 42
11831184 ^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments