るりまサーチ

最速Rubyリファレンスマニュアル検索!
9件ヒット [1-9件を表示] (0.076秒)
トップページ > クエリ:Object#class[x] > クエリ:to_regexp[x] > クエリ:FALSE[x] > クエリ:Singleton[x] > クラス:NameError[x]

別のキーワード

  1. _builtin to_s
  2. openssl to_der
  3. openssl to_s
  4. _builtin to_a
  5. openssl to_pem

ライブラリ

検索結果

NameError#receiver -> object (108.0)

self が発生した時のレシーバオブジェクトを返します。

...self が発生した時のレシーバオブジェクトを返します。

例:

class
Sample
def foo
return "foo"
end
end

bar = Sample.new
begin
bar.bar
rescue NameError => err
p err.receiver # => #<Sample:0x007fd4d89b3110>
p err.receiver.foo # => "foo"
en...