Ruby: Is &! documented anywhere?

https://news.ycombinator.com/item?id=4117049
by chrislaco • 14 years ago
5 2 14 years ago

A while back, due to a typo, I realized you could use &! in ruby statements:

  if this? &! that?
was the same as
  if this? && !that?
I've scoured all of the ruby operator docs I can find with no mention of it anywhere.

Interestingly, this works:

  if this? & ! that?
but this does not:
  if this? & & that?

If I ack the ruby source, I don't see &!, but I do see a ton of &&!

Wat? Now I'm curious. Anyone know the innards of ruby enough to enlighten me?

Related Stories

Loading related stories...

Source preview

news.ycombinator.com