Commit 41639572

41639572aa2cMerged

Yukihiro "Matz" Matsumoto <[email protected]> · 6 months ago · 114 files · +27 added · -87 deleted

Description

test: bundle medium-class tests via auto-rename (~30 tests bundled)

Adds rename_bundle.sh that prefixes top-level class names with T_<test_name>_ to avoid collisions across bundled tests. Smart bisecting loop applied to first 50 medium-class candidates.

Net: 14 multi-test class bundles. Single-test bundles unbundled back to standalone (no savings). Tests that didn't fit (e.g., class_const_as_value, class_method_open_class_call) flag specific codegen patterns that wrapper class renaming doesn't yet handle.

Verified: default 569/0/0, optcarrot 59662.

Co-Authored-By: Claude Opus 4.7 [email protected]

Details

Commit
41639572aa2c
Parent
da342dbd2a51

test/alias_method.rbdeleted

1-# AliasMethodNode -- `alias greet hello` inside a class body.
2-#
3-# CRuby snapshots the method at alias time -- if `hello` is later
4-# redefined, `greet` still calls the original. In Spinel's AOT model
5-# methods are static C functions; we register a compile-time
6-# synonym so dispatch on `.greet` routes to the same C function as
7-# `.hello`. Out of scope: alias inside a method body (CRuby allows
8-# but the semantics differ); alias of an inherited method.
9-
10-class Greeter
11- def hello = "hi from hello"
12- alias greet hello
13-end
14-
15-g = Greeter.new
16-puts g.hello # hi from hello
17-puts g.greet # hi from hello
18-
19-# Two aliases of the same method.
20-class Counter
21- def value = 42
22- alias get value
23- alias read value
24-end
25-c = Counter.new
26-puts c.value # 42
27-puts c.get # 42
28-puts c.read # 42