self & other -> IntegerRuby 2.4.0 から[permalink][rdoc][edit]-
ビット二項演算子。論理積を計算します。
- [PARAM]
other: - 数値
p 1 & 1 # => 1 p 2 & 3 # => 2 - [PARAM]
このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。 最新版のマニュアルへ
self & other -> IntegerRuby 2.4.0 から[permalink][rdoc][edit]ビット二項演算子。論理積を計算します。
other:p 1 & 1 # => 1
p 2 & 3 # => 2