I should admit that I never liked object to which a block method is called being passed as block parameter. Even for tap, for example, ```ruby (1..10).tap{ |x| logger.debug x } ``` looks a bit < u guess >. I'd like to say ...jihwans (Jihwan Song)
I think the goal is always to keep Ruby language beautiful. The original request was done with certain motive. What is desired is to find a Ruby way, targetting the original motive. Simply following requests will end up with hairy langu...jihwans (Jihwan Song)
I realized that what is desired here is somewhat different than what can be achieved using `class_eval`, `instance_eval` and/or `yield`. What is really desired is a way to define an unnamed instance method that has access only to publ...jihwans (Jihwan Song)
Matthew Kerwin wrote: > How often do you see the keyword `yield` without arguments? Even in your examples you are clearly passing arguments (direct objects) to it. Well, arguments are not he one 'yield' shall yield, but the block is......jihwans (Jihwan Song)
Matt, I guess I had totally different understanding of the Ruby keyword 'yield'. When I first saw the language years back, at the statement saying 'yield' I was speaking to myself "yield what??" -- I always took it as meaning "produce...jihwans (Jihwan Song)
I wonder what is the biggest reason that yield may not be the word.... ~~~ruby class Object def yield(*args, &blk) yield(self, *args) end end puts 1.yield(2, 3) { |one, two, three| one + two + three } [1, 2, 3, 4].sel...jihwans (Jihwan Song)