From: Tony Arcieri Date: 2012-02-07T11:07:04+09:00 Subject: Re: Using _ like in Scala? --0015175900421f766f04b8563c42 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Feb 6, 2012 at 5:56 PM, Eric Christopherson < echristopherson@gmail.com> wrote: > > IMHO, Ruby's block argument semantics are already crazy enough. > > How so? The status quo is: - Yielding arguments to a block without arguments discards the arguments - Yielding a higher arity than what the block accepts truncates the arguments bound (the above can be considered the degenerate case of this) - Yielding a lower arity binds arguments to nil So okay, given that, maybe a default argument could jive. I've seen the same thing in Groovy, except they call it "it" _ has precedence in irb already as the result of the last expression evaluated... but _ might still work for this purpose. I've been using in in the Erlang sense sometimes to discard a variable in cases where I don't care (although thanks to what Ruby syntax allows even that is superfluous) -- Tony Arcieri --0015175900421f766f04b8563c42--