Robert Dober wrote:
> Does it have it's own scope?
yes:

  class MyTrue
    def & &blk
      self and yield
    end
  end

  true && a = 5
  a  # => 5

  foo = MyTrue.new
  foo.& { b = 5 }
  b  # ~> undefined local variable or method `b' for main:Object

we expect both sides of an && expression to be evaluated on the same
scope as the expression itself, so we can't just make a && b syntactic
sugar for a.&& { b }. although, Ruby's for loop is really syntactic
sugar for each, and I don't know how they manage to make it use the
surrounding scope (actually a surprising thing...) so, maybe it *can* be
done ;)

to the Smalltalk one: a typical example of why I think Smalltalk is just
too strange for me. "boolean.true?" is not how I want to program - I
say, read, write and think if-then-else style. but it's cool that it can
be done in Ruby, too.
[murphy]