るりまサーチ

最速Rubyリファレンスマニュアル検索!
830件ヒット [801-830件を表示] (0.018秒)
トップページ > クラス:Integer[x] > ライブラリ:ビルトイン[x] > 種類:インスタンスメソッド[x]

キーワード

検索結果

<< < ... 7 8 9 >>

Integer#upto(max) {|n| ... } -> Integer (4.0)

self から max まで 1 ずつ増やしながら繰り返します。 self > max であれば何もしません。

...self から max まで 1 ずつ増やしながら繰り返します。
self > max であれば何もしません。

@param max 数値
@return self を返します。

//emlist[][ruby]{
5.upto(10) {|i| print i, " " } # => 5 6 7 8 9 10
//}

@see Integer#downto, Numeric#step, Integer#times...

Integer#|(other) -> Integer (4.0)

ビット二項演算子。論理和を計算します。

ビット二項演算子。論理和を計算します。

@param other 数値

//emlist[][ruby]{
1 | 1 # => 1
2 | 3 # => 3
//}

Integer#~ -> Integer (4.0)

ビット演算子。否定を計算します。

ビット演算子。否定を計算します。

//emlist[][ruby]{
~1 # => -2
~3 # => -4
~-4 # => 3
//}
<< < ... 7 8 9 >>