Commit 59bbbe93
59bbbe93deccMerged
Yukihiro "Matz" Matsumoto <[email protected]> · 5 months ago · 2 files · ~2 modified
Description
test: drop Range#length from range_exclude_end_size
Range has no #length in CRuby (it raises NoMethodError), so the test diverged from the reference oracle. Remove the #length calls and regenerate the expected output; exclude_end?/size/count on both literal and method-parameter ranges still provide the coverage.
Co-Authored-By: Claude Opus 4.8 (1M context) [email protected]
Details
- Commit
- 59bbbe93decc
- Parent
- d1524b18bfbe
test/range_exclude_end_size.rbmodifiedView file
@@ -1,11 +1,10 @@
11
# Non-literal ranges: passing through a method parameter defeats2-
# compile-time constant-folding, so `exclude_end?`/`size`/`count`/3-
# `length` must read the runtime `excl` flag off the sp_Range struct.2+
# compile-time constant-folding, so `exclude_end?`/`size`/`count`3+
# must read the runtime `excl` flag off the sp_Range struct.44
def report(r)55
puts r.exclude_end?66
puts r.size77
puts r.count8-
puts r.length98
end109
1110
report(1...5)@@ -20,5 +19,3 @@
2019
puts (1..5).count2120
puts (0...10).size2221
puts (0..10).size23-
puts (1...5).length24-
puts (1..5).lengthtest/range_exclude_end_size.rb.expectedmodifiedView file
Loading diff…