るりまサーチ

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

別のキーワード

  1. object yield_self
  2. _builtin yield_self
  3. _builtin self
  4. tracepoint self
  5. codeobject document_self=

ライブラリ

検索結果

Symbol#<=>(other) -> -1 | 0 | 1 | nil (6133.0)

self と other のシンボルに対応する文字列を ASCII コード順で比較して、 self が小さい時には -1、等しい時には 0、大きい時には 1 を返します。

...
self
と other のシンボルに対応する文字列を ASCII コード順で比較して、
self
が小さい時には -1、等しい時には 0、大きい時には 1 を返します。

other がシンボルではなく比較できない時には nil を返します。

@param other 比較対...
...象のシンボルを指定します。

//emlist[][ruby]{
p :aaa <=> :xxx # => -1
p :aaa <=> :aaa # => 0
p :xxx <=> :aaa # => 1
p :foo <=> "foo" # => nil
//}

@see String#<=>, Symbol#casecmp...