Keyword for exclusive or in ruby?

Andrew Grimm picture Andrew Grimm · Feb 25, 2009 · Viewed 16.7k times · Source

Does Ruby have a plain-English keyword for exclusive or, like they have "and" and "or"? If not, is this because exclusive or doesn't allow evaluation short-cutting?

Answer

Garry Shutler picture Garry Shutler · Feb 25, 2009

No it doesn't, you can only use ^.

Don't know why there isn't particularly, may just be because it isn't as commonly used.