Commit 87abf04e
87abf04e0221Merged
Yukihiro "Matz" Matsumoto <[email protected]> · 6 months ago · 3 files · ~2 modified · -1 deleted
Description
Revert "fix: Hash#fetch with hash default on int-leaf hash"
This reverts commit 9f38cf1bcd050ddfe24c7a21ff7c4fbba99cf38a.
Details
- Commit
- 87abf04e0221
- Parent
- b9fe6475f7f6
spinel_analyze.rbmodifiedView file
@@ -3808,16 +3808,6 @@
38083808
if def_at_f == "string" || def_at_f == "mutable_str"38093809
return "string"38103810
end3811-
# Hash-typed default (`fetch "k", {}`). Sequel to the3812-
# string-default case above: the two ternary arms are int (from3813-
# the get) and a hash pointer (from the default literal), with3814-
# no shared primitive type. Box both to sp_RbVal and surface3815-
# the call's result as poly. Limited to the int-leaf hash3816-
# variants for now; broader receivers can extend the pattern.3817-
if is_hash_type(def_at_f) == 13818-
@needs_rb_value = 13819-
return "poly"3820-
end38213811
end38223812
end38233813
endspinel_codegen.rbmodifiedView file
Loading diff…
test/hash_fetch_hash_default.rbdeleted
Loading diff…