るりまサーチ

最速Rubyリファレンスマニュアル検索!
266件ヒット [1-100件を表示] (0.188秒)
トップページ > クエリ:-[x] > クエリ:E[x] > クエリ:d[x] > クエリ:<=>[x]

別のキーワード

  1. open3 popen2e
  2. socket af_e164
  3. matrix det_e
  4. matrix rank_e
  5. open3 capture2e

検索結果

<< 1 2 3 > >>

Gem::Dependency#<=>(other) -> Integer (27400.0)

self と other を Gem::Dependency#name の ASCII コードで比較して self が大きい時には正の整数、等しい時には 0、小さい時には負の整数を返します。

...self と other を Gem::Dependency#name の ASCII コードで比較して
self が大きい時には正の整数、等しい時には 0、小さい時には負の整数を返します。...

Module#<=>(other) -> Integer | nil (24460.0)

self と other の継承関係を比較します。

...self と other の継承関係を比較します。

self と other を比較して、
self が other の子孫であるとき -1、
同一のクラス/モジュールのとき 0、
self が other の先祖であるとき 1
を返します。

継承関係にないクラス同士の比較では
n...
...other がクラスやモジュールでなければ
nil を返します。

@param other 比較対象のクラスやモジュール

//emlist[例][ruby]{
module Foo
e
nd
class Bar
include Foo
e
nd
class Baz < Bar
e
nd
class Qux
e
nd
p Bar <=> Foo # => -1
p Baz <=> Bar # => -1
p Baz <=> Foo...
...# => -1
p Baz <=> Qux # => nil
p Qux <=> Baz # => nil

p Baz <=> Object.new # => nil
//}...

Fiddle::Pointer#<=>(other) -> Integer (24406.0)

ポインタの指すアドレスの大小を比較します。

...ポインタの指すアドレスの大小を比較します。

other より小さい場合は -1, 等しい場合は 0、other より大きい場合は
1を返します。

@param other 比較対象の Pointer オブジェクト...

Date#<=>(other) -> -1 | 0 | 1 | nil (24354.0)

二つの日付を比較します。 同じ日付なら 0 を、self が other よりあとの日付なら 1 を、 その逆なら -1 を返します。

...self が other よりあとの日付なら 1 を、
その逆なら -1 を返します。

other は日付オブジェクトか、
天文学的なユリウス日をあらわす数値を指定します。
そうでない場合、比較ができないので nil を返します。

//emlist[][ruby]{
re...
...quire "date"

p Date.new(2001, 2, 3) <=> Date.new(2001, 2, 4) # => -1
p Date.new(2001, 2, 3) <=> Date.new(2001, 2, 3) # => 0
p Date.new(2001, 2, 3) <=> Date.new(2001, 2, 2) # => 1
p Date.new(2001, 2, 3) <=> Object.new # => nil
p Date.new(2001, 2, 3) <=> Rational(4903887, 2) # => 0
//}

@pa...
...ram other 日付オブジェクトまたは数値...

BigDecimal#<=>(other) -> -1 | 0 | 1 | nil (24317.0)

self が other より大きい場合に 1 を、等しい場合に 0 を、小さい場合には -1 をそれぞれ返します。

...self が other より大きい場合に 1 を、等しい場合に 0 を、小さい場合には
-
1 をそれぞれ返します。

self と other が比較できない場合には nil を返します。...

絞り込み条件を変える

RDoc::Context#<=>(other) -> -1 | 0 | 1 (24301.0)

自身と other の full_name を比較した結果を返します。

...自身と other の full_name を比較した結果を返します。

ソートのために使われます。

@param other 自身と比較したいオブジェクトを指定します。...

IPAddr#<=>(other) -> Integer | nil (21400.0)

self と other を比較します。

...self と other を比較します。

@param other 比較対象の IPAddr オブジェクト。

@return self と other のアドレスファミリが一致しない場合は nil を返します。
アドレスファミリが一致する場合は、両方の数値表現を Integer#<=>...
...で比較した結果を返します。

@see Integer#<=>...

Range#include?(obj) -> bool (12312.0)

obj が範囲内に含まれている時に true を返します。 そうでない場合は、false を返します。

...ている時に true を返します。
そうでない場合は、false を返します。


<=>
メソッドによる演算により範囲内かどうかを判定するには Range#cover? を使用してください。

始端・終端・引数が数値であれば、 Range#cover? と同様の動...
...指定します。

//emlist[例][ruby]{
p ("a" .. "c").include?("b") # => true
p ("a" .. "c").include?("B") # => false
p ("a" .. "c").include?("ba") # => false
p ("a" .. "c").cover?("ba") # => true

p (1 .. 3).include?(1.5) # => true
//}

@see d:spec/control#case
@see Range#cover?, Range#===...

Fiddle::Importer#bind(signature, *opts) { ... } -> Fiddle::Function (9324.0)

Ruby のブロックを C の関数で wrap し、その関数をモジュールに インポートします。

...た、Fiddle::Importer#[] で Fiddle::Function オブジェクトとして
取り出すことができます。

signature で関数の名前とシネグチャを指定します。例えば
"int compare(void*, void*)" のように指定します。

opts には :stdcall もしくは :cdecl を渡...
...Fiddle::Importer
d
lload "libc.so.6"
typealias "size_t", "unsigned long"
e
xtern "int qsort(void*, size_t, size_t, void*)"

bind("int compare(void*, void*)"){|px, py|
x = px.to_s(Fiddle::SIZEOF_INT).unpack("i!")
y = py.to_s(Fiddle::SIZEOF_INT).unpack("i!")

x <=>...
...y
}
e
nd

d
ata = [32, 180001, -13, -1, 0, 49].pack("i!*")
M.qsort(Fiddle::Pointer[data], 6, Fiddle::SIZEOF_INT, M["compare"])
p data.unpack("i!*") # => [-13, -1, 0, 32, 49, 180001]...

Range#include?(obj) -> bool (9312.0)

obj が範囲内に含まれている時に true を返します。 そうでない場合は、false を返します。

...内に含まれている時に true を返します。
そうでない場合は、false を返します。

Range#=== は主に case 式での比較に用いられます。

<=>
メソッドによる演算により範囲内かどうかを判定するには Range#cover? を使用してください。...
...Range#cover? と同様の動きをします。

@param obj 比較対象のオブジェクトを指定します。

//emlist[例][ruby]{
p ("a" .. "c").include?("b") # => true
p ("a" .. "c").include?("B") # => false
p ("a" .. "c").include?("ba") # => false
p ("a" .. "c").cover?("ba") # => true

p...
...(1 .. 3).include?(1.5) # => true
//}

@see d:spec/control#case
@see Range#cover?...

絞り込み条件を変える

Range#member?(obj) -> bool (9212.0)

obj が範囲内に含まれている時に true を返します。 そうでない場合は、false を返します。

...ている時に true を返します。
そうでない場合は、false を返します。


<=>
メソッドによる演算により範囲内かどうかを判定するには Range#cover? を使用してください。

始端・終端・引数が数値であれば、 Range#cover? と同様の動...
...指定します。

//emlist[例][ruby]{
p ("a" .. "c").include?("b") # => true
p ("a" .. "c").include?("B") # => false
p ("a" .. "c").include?("ba") # => false
p ("a" .. "c").cover?("ba") # => true

p (1 .. 3).include?(1.5) # => true
//}

@see d:spec/control#case
@see Range#cover?, Range#===...
<< 1 2 3 > >>