るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.021秒)

別のキーワード

  1. fiddle ref
  2. entity ref
  3. pointer ref
  4. rexml/document ref
  5. _builtin _id2ref

ライブラリ

クラス

検索結果

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

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

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

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

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

//emlist[][ruby]{
age = 12
# (0..2).===(12), (3..6).===(12), ... が実行される
result =...
...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...