るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.078秒)
トップページ > バージョン:2.3.0[x] > 種類:インスタンスメソッド[x] > クエリ:t[x] > クエリ:<=>[x] > ライブラリ:rubygems/version[x]

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

クラス

検索結果

Gem::Version#<=>(other) -> -1 | 0 | 1 | nil (54682.0)

self と other を比較して、self が小さい時に -1、 等しい時に 0、大きい時に 1 の整数を返します。 また、other が Gem::Version ではなく比較できないとき、 nil を返します。

self と other を比較して、self が小さい時に -1、
等しい時に 0、大きい時に 1 の整数を返します。
また、other が Gem::Version ではなく比較できないとき、 nil を返します。

//emlist[][ruby]{
p Gem::Version.new("3.9.0") <=> Gem::Version.new("3.10.0") # => -1
p Gem::Version.new("3.0.0") <=> Gem::Version.new("3.0.0") # => 0
p Gem::Version.new("3.0.0") <=> G...