るりまサーチ

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

別のキーワード

  1. etc age=
  2. etc age
  3. passwd age=
  4. passwd age
  5. cookie max_age=

ライブラリ

検索結果

Object#===(other) -> bool (7.0)

case 式で使用されるメソッドです。d:spec/control#case も参照してください。

...トでは内部で Object#== を呼び出します。

when 節の式をレシーバーとして === を呼び出すことに注意してください。

また Enumerable#grep でも使用されます。

@param other 比較するオブジェクトです。

//emlist[][ruby]{
age =
12
# (0..2).===(...
...String class. But don't hit."
else
"unknown"
end
end

puts check([]) #=> unknown
puts check("mash-up in Ruby on Rails") #=> instance of String class. But not hit...
puts check("<Ruby's world>") #=> hit! <Ruby's world>
//}

@see Object#==, Range#===, Module#===, Regexp#===, Enumerable#grep...