ZJIT: Fix incorrect method name in test for Array#size

This commit is contained in:
Stan Lo 2025-06-04 12:14:44 +01:00 committed by GitHub
parent 675f33508c
commit a87b089349
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
Notes: git 2025-06-04 11:14:58 +00:00
Merged: https://github.com/ruby/ruby/pull/13487

Merged-By: XrXr

View file

@ -4715,14 +4715,14 @@ mod opt_tests {
fn eliminate_array_size() { fn eliminate_array_size() {
eval(" eval("
def test def test
x = [].length x = [].size
5 5
end end
"); ");
assert_optimized_method_hir("test", expect![[r#" assert_optimized_method_hir("test", expect![[r#"
fn test: fn test:
bb0(): bb0():
PatchPoint MethodRedefined(Array@0x1000, length@0x1008) PatchPoint MethodRedefined(Array@0x1000, size@0x1008)
v6:Fixnum[5] = Const Value(5) v6:Fixnum[5] = Const Value(5)
Return v6 Return v6
"#]]); "#]]);