Keyword for exclusive or in ruby?

后端 未结 7 1926
广开言路
广开言路 2021-01-04 00:03

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?

7条回答
  •  抹茶落季
    2021-01-04 01:06

    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.

提交回复
热议问题