るりまサーチ

最速Rubyリファレンスマニュアル検索!
722件ヒット [601-700件を表示] (0.108秒)
トップページ > クエリ:ruby[x] > クエリ:Ruby[x] > 種類:インスタンスメソッド[x] > クエリ:i[x] > クエリ:@[x] > クラス:Integer[x]

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

キーワード

検索結果

<< < ... 5 6 7 8 > >>

Integer#pred -> Integer (3120.0)

self から -1 した値を返します。

...self から -1 した値を返します。

//emlist[][ruby]{
1.pred #=> 0
(-1).pred #=> -2
//}

@
see Integer#next...

Integer#succ -> Integer (3120.0)

self の次の整数を返します。

...self の次の整数を返します。

//emlist[][ruby]{
1.next #=> 2
(-1).next #=> 0
1.succ #=> 2
(-1).succ #=> 0
//}

@
see Integer#pred...

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

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

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

@
param other 数値

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

Integer#upto(max) -> Enumerator (3044.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#to_bn -> OpenSSL::BN (3038.0)

Integer を同じ数を表す OpenSSL::BN のオブジェクトに 変換します。

...
Integer
を同じ数を表す OpenSSL::BN のオブジェクトに
変換します。

//emlist[][ruby]{
require 'pp'
require 'openssl'

pp 5.to_bn #=> #<OpenSSL::BN 5>
pp (-5).to_bn #=> #<OpenSSL::BN -5>
//}

なお、実装は、以下のようになっています。

//emlist[][ruby]{
clas...
...s Integer
def to_bn
OpenSSL::BN::new(self)
end
end
//}

@
see OpenSSL::BN.new, OpenSSL::BN#to_i...
...
Integer
を同じ数を表す OpenSSL::BN のオブジェクトに
変換します。

//emlist[][ruby]{
require 'openssl'

pp 5.to_bn #=> #<OpenSSL::BN 5>
pp (-5).to_bn #=> #<OpenSSL::BN -5>
//}

なお、実装は、以下のようになっています。

//emlist[][ruby]{
class Integer
d...
...ef to_bn
OpenSSL::BN::new(self)
end
end
//}

@
see OpenSSL::BN.new, OpenSSL::BN#to_i...

絞り込み条件を変える

Integer#<(other) -> bool (3026.0)

比較演算子。数値として小さいか判定します。

...比較演算子。数値として小さいか判定します。

@
param other 比較対象の数値
@
return self よりも other が大きい場合 true を返します。
そうでなければ false を返します。

//emlist[][ruby]{
1 < 1 # => false
1 < 2 # => true
//}...

Integer#<=(other) -> bool (3026.0)

比較演算子。数値として等しいまたは小さいか判定します。

...小さいか判定します。

@
param other 比較対象の数値
@
return self よりも other の方が大きい場合か、
両者が等しい場合 true を返します。
そうでなければ false を返します。

//emlist[][ruby]{
1 <= 0 # => false
1 <= 1...

Integer#==(other) -> bool (3026.0)

比較演算子。数値として等しいか判定します。

...比較演算子。数値として等しいか判定します。

@
param other 比較対象の数値
@
return self と other が等しい場合 true を返します。
そうでなければ false を返します。

//emlist[][ruby]{
1 == 2 # => false
1 == 1.0 # => true
//}...

Integer#===(other) -> bool (3026.0)

比較演算子。数値として等しいか判定します。

...比較演算子。数値として等しいか判定します。

@
param other 比較対象の数値
@
return self と other が等しい場合 true を返します。
そうでなければ false を返します。

//emlist[][ruby]{
1 == 2 # => false
1 == 1.0 # => true
//}...

Integer#>(other) -> bool (3026.0)

比較演算子。数値として大きいか判定します。

...演算子。数値として大きいか判定します。

@
param other 比較対象の数値
@
return self よりも other の方が小さい場合 true を返します。
そうでなければ false を返します。

//emlist[][ruby]{
1 > 0 # => true
1 > 1 # => false
//}...

絞り込み条件を変える

<< < ... 5 6 7 8 > >>