Skip to content

Commit fb28d47

Browse files
nirvdrumtekknolagi
authored andcommitted
ZJIT: Change the output on redefined method tests to verify the new definition is used
1 parent 447989e commit fb28d47

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/ruby/test_zjit.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,11 +1041,11 @@ def test(x)
10411041
end
10421042

10431043
def test_opt_newarray_send_include_p_redefined
1044-
assert_compiles '[true, false]', %q{
1044+
assert_compiles '[:true, :false]', %q{
10451045
class Array
10461046
alias_method :old_include?, :include?
10471047
def include?(x)
1048-
old_include?(x)
1048+
old_include?(x) ? :true : :false
10491049
end
10501050
end
10511051
@@ -1066,11 +1066,11 @@ def test(x)
10661066
end
10671067

10681068
def test_opt_duparray_send_include_p_redefined
1069-
assert_compiles '[true, false]', %q{
1069+
assert_compiles '[:true, :false]', %q{
10701070
class Array
10711071
alias_method :old_include?, :include?
10721072
def include?(x)
1073-
old_include?(x)
1073+
old_include?(x) ? :true : :false
10741074
end
10751075
end
10761076

0 commit comments

Comments
 (0)