From: surrender_it@... (gabriele renzi @ google) Date: 2004-03-19T21:44:30+09:00 Subject: why yield does not set $_ ? Hi, Probably I just need to sleep, but I wonder: why $_ from yield? It would be useful for iterators' loops. I'd expect this to work: file.each { gsub /a/,'b'} (using Kernel#gsub) but it does not. Are there performance reasons or something else for this? Notice that, in general, I don't like $_ and hope it disappears, but while it is still there I'm someway seduced from it.. PS On this line, it would be even interesting to default every method called withouth a receiver to $_ [1,2,3].map { .+ 1} #=> [2,3,4] We could even kill Kernel::gsub, ::split and the likes as we can achieve similar result with just a '.' more.. or: [1,2,3].any? { .==1} BTW, I suppose ruby would become perl this way..