るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.042秒)

別のキーワード

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

ライブラリ

クラス

キーワード

検索結果

OpenSSL::BN#ucmp(other) -> -1 | 0 | 1 (18150.0)

自身と other の絶対値を比較し、自身の絶対値が小さいときには -1、 等しいときには 0、 大きいときには 1 を返します。

...

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

OpenSSL::BN.new(-5).ucmp(5) # => 0

OpenSSL::BN.new(5).ucmp(OpenSSL::BN.new(-9)) # => -1
OpenSSL::BN.new(-5).ucmp(OpenSSL::BN.new(5)) # => 0
OpenSSL::BN.new(-5).ucmp(OpenSSL::BN.new(2)) # => 1
//}

@
param other 比較する整数
@
raise TypeError 比...
...較できないときに発生します。
@
see OpenSSL::BN#cmp...

OpenSSL::BN#<=>(other) -> -1 | 0 | 1 (31.0)

自身と other を比較し、自身が小さいときには -1、 等しいときには 0、大きいときには 1 を返します。

...ます。

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

OpenSSL::BN.new(5) <=> 5 # => 0

OpenSSL::BN.new(5) <=> OpenSSL::BN.new(9) # => -1
OpenSSL::BN.new(5) <=> OpenSSL::BN.new(5) # => 0
OpenSSL::BN.new(5) <=> OpenSSL::BN.new(-5) # => 1
//}

@
param other 比較する整数
@
raise TypeError 比較で...
...きないときに発生します。
@
see OpenSSL::BN#ucmp...

OpenSSL::BN#cmp(other) -> -1 | 0 | 1 (31.0)

自身と other を比較し、自身が小さいときには -1、 等しいときには 0、大きいときには 1 を返します。

...ます。

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

OpenSSL::BN.new(5) <=> 5 # => 0

OpenSSL::BN.new(5) <=> OpenSSL::BN.new(9) # => -1
OpenSSL::BN.new(5) <=> OpenSSL::BN.new(5) # => 0
OpenSSL::BN.new(5) <=> OpenSSL::BN.new(-5) # => 1
//}

@
param other 比較する整数
@
raise TypeError 比較で...
...きないときに発生します。
@
see OpenSSL::BN#ucmp...