るりまサーチ

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

別のキーワード

  1. optparse on
  2. optionparser on
  3. tracer on
  4. thread abort_on_exception
  5. thread abort_on_exception=

検索結果

<< < 1 2 3 >>

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

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

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

このメソッドは case 式での振る舞いを考慮して、
各クラスの性質に合わせて再定義すべきです。

デフォルトでは内部で Object#== を呼び出します。

when 節の...
...lt #=> "child"

def check arg
case arg
when /ruby(?!\s*on\s*rails)/i
"hit! #{arg}"
when String
"Instance of 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...
<< < 1 2 3 >>