るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.012秒)
トップページ > バージョン:2.6.0[x] > クエリ:nil[x] > ライブラリ:webrick/httpversion[x]

別のキーワード

  1. _builtin nil?
  2. object nil?
  3. nilclass nil?
  4. object nil
  5. _builtin nil

クラス

検索結果

WEBrick::HTTPVersion#<=>(other) -> -1 | 0 | 1 | nil (358.0)

自身と指定された other のバージョンを比較します。 自身が other より新しいなら 1、同じなら 0、古いなら -1 を返します。 比較できない場合に nil を返します。

自身と指定された other のバージョンを比較します。
自身が other より新しいなら 1、同じなら 0、古いなら -1 を返します。
比較できない場合に nil を返します。

@param other HTTP のバージョンを表す WEBrick::HTTPVersion オブジェクトか文字列を指定します。

require 'webrick'
v = WEBrick::HTTPVersion.new('1.1')
p v < '1.0' #=> false