self ^ other -> IntegerRuby 2.4.0 から[permalink][rdoc][edit]-
selfとotherのビット排他的論理和を返します。Integerオブジェクトを左項とする二項演算子^はこのメソッドの呼び出しになります。- [PARAM]
other: - 数値
p 1 ^ 1 # => 0 p 2 ^ 3 # => 1 - [PARAM]
このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。 最新版のマニュアルへ
self ^ other -> IntegerRuby 2.4.0 から[permalink][rdoc][edit]
self と other のビット排他的論理和を返します。
Integer オブジェクトを左項とする二項演算子 ^ はこのメソッドの呼び出しになります。
other:p 1 ^ 1 # => 0
p 2 ^ 3 # => 1