3 ms·
Of course it is. `for a in b` desugars to `b#each`, not the other way around.
by masklinn 12y ago
Of course it is. `for a in b` desugars to `b#each`, not the other way around.
- picks_at_nits 12y agoHow do “while” and “until” desugar? Kernel#loop?
- chrisseaton 12y agoThose are two rare exceptions and you're right they don't desugar.
- picks_at_nits 12y agoThose are not “exceptions” to Ruby’s primitives, those are Ruby’s primitives. Things that desugar to methods aren’t primitives. The thing is, they’re rare in practice for cultural reasons.