621件ヒット
[601-621件を表示]
(0.080秒)
別のキーワード
クラス
- BasicObject (24)
- Exception (8)
-
Fiddle
:: Function (12) - Hash (12)
- Logger (24)
- Method (115)
- Module (24)
- Object (24)
- Proc (80)
- Set (24)
- Symbol (12)
- Thread (42)
-
Thread
:: Backtrace :: Location (48) - TracePoint (106)
- UnboundMethod (18)
モジュール
- Enumerable (48)
キーワード
- << (14)
- === (20)
- >> (14)
- [] (24)
-
absolute
_ path (12) -
add
_ trace _ func (12) -
base
_ label (12) - bind (6)
-
bind
_ call (12) - binding (12)
-
callee
_ id (12) - clone (12)
- curry (22)
-
default
_ proc (12) -
defined
_ class (12) - detect (24)
- divide (24)
- event (12)
- find (24)
- formatter (12)
- formatter= (12)
- inspect (24)
-
instance
_ eval (24) -
instance
_ method (12) - lambda? (12)
- lineno (12)
- method (12)
-
method
_ id (12) - parameters (7)
- path (12)
-
report
_ on _ exception (9) -
report
_ on _ exception= (9) -
ruby2
_ keywords (18) - self (3)
-
set
_ trace _ func (12) -
singleton
_ method (12) -
super
_ method (11) -
to
_ proc (24) -
to
_ s (12) - yield (12)
検索結果
-
TracePoint
# path -> String (19.0) -
イベントが発生したファイルのパスを返します。
...トが発生したファイルのパスを返します。
@raise RuntimeError イベントフックの外側で実行した場合に発生します。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:call) do |tp|
p tp.path # => "/path/to/test.rb"
end
trace.enable
foo 1
//}... -
TracePoint
# self -> object (19.0) -
イベントを発生させたオブジェクトを返します。
...返します。
以下のようにする事で同じ値を取得できます。
なお、self メソッドは binding が nil になる :c_call および :c_return イベントに対しても正しく動作します。
//emlist[例][ruby]{
trace.binding.eval('self')
//}
@see TracePoint#binding... -
UnboundMethod
# bind(obj) -> Method (19.0) -
self を obj にバインドした Method オブジェクトを生成して返します。
...スのインスタンスのみです。
@raise TypeError objがbindできないオブジェクトである場合に発生します
//emlist[例][ruby]{
# クラスのインスタンスメソッドの UnboundMethod の場合
class Foo
def foo
"foo"
end
end
# UnboundMethod `m' を生成
p m......_method(:foo) # => #<UnboundMethod: Foo#foo>
# Foo をインクルードしたクラス Bar のインスタンスをレシーバと
# する Method オブジェクトを生成
class Bar
include Foo
end
p m.bind(Bar.new) # => #<Method: Bar(Foo)#foo>
//}
@see UnboundMethod#bind_call...