Commit 2d7eba6f
2d7eba6fc3ddMerged
Yukihiro "Matz" Matsumoto <[email protected]> · 6 months ago · 3 files · ~3 modified
Description
refactor: rename stale helper names after coverage expanded
Two helpers grew to cover more than their names suggested:
is_lengthlike_only_method -> is_collection_query_method. Originally just length / size / empty? per #552; gained include? in #558. The new name reflects "methods that query a container's shape" rather than just "length-like".
scan_for_dig_usage -> scan_for_container_typedef_usage.
Pre-scans for recv.dig(...) per #555 case 07; gained
the same pattern for recv.include?(...) in #558. Both
arm the Sym-keyed and Str-poly-keyed hash typedef
@needs flags so emit_dig_step / emit_poly_builtin_dispatch
can reference the typedefs unconditionally.
No behavior change; pure rename + comment refresh.
Co-Authored-By: Claude Opus 4.7 (1M context) [email protected]
Details
- Commit
- 2d7eba6fc3dd
- Parent
- 1961599cfed8
spinel_analyze.rbmodifiedView file
# storage. Issue #552. Conservative list: only methods that # truly don't exist on Integer (so widening is sound and no # caller breaks from a previously-int-typed arg path). def is_lengthlike_only_method(mname) def is_collection_query_method(mname) if mname == "length" || mname == "size" return 1 end saw = 0 kk = 0 while kk < called.length if is_lengthlike_only_method(called[kk]) == 1 if is_collection_query_method(called[kk]) == 1 saw = 1 end kk = kk + 1 sawc = 0 kk = 0 while kk < called_c.length if is_lengthlike_only_method(called_c[kk]) == 1 if is_collection_query_method(called_c[kk]) == 1 sawc = 1 end kk = kk + 1spinel_codegen.rbmodifiedView file
Loading diff…
test/param_include_body_widen.rbmodifiedView file
Loading diff…