453件ヒット
[401-453件を表示]
(0.070秒)
ライブラリ
- ビルトイン (201)
- bigdecimal (12)
- fiddle (36)
- json (12)
- mkmf (24)
-
net
/ pop (36) -
net
/ smtp (108) - rake (12)
-
rdoc
/ markdown (12)
クラス
- BigDecimal (12)
-
Fiddle
:: Handle (36) -
JSON
:: State (12) -
Net
:: POP3 (36) -
Net
:: SMTP (108) -
RDoc
:: Markdown (12) -
Rake
:: Task (12) - TracePoint (201)
モジュール
- Kernel (24)
キーワード
- binding (12)
-
callee
_ id (12) -
close
_ enabled? (12) - coerce (12)
-
defined
_ class (12) - disable (24)
-
disable
_ close (12) -
disable
_ ssl (12) -
disable
_ starttls (12) -
enable
_ close (12) -
enable
_ config (24) -
enable
_ ssl (24) -
enable
_ starttls (12) -
enable
_ starttls _ auto (12) -
enable
_ tls (12) - enabled? (12)
-
eval
_ script (7) - event (12)
- extension (12)
- inspect (12)
-
instruction
_ sequence (7) - lineno (12)
-
method
_ id (12) - parameters (7)
- path (12)
-
quirks
_ mode= (12) -
raised
_ exception (12) - reenable (12)
-
return
_ value (12) - ssl? (12)
-
starttls
_ always? (12) -
starttls
_ auto? (12) - tls? (12)
-
use
_ ssl? (12)
検索結果
先頭5件
-
TracePoint
# method _ id -> Symbol | nil (7.0) -
イベントが発生したメソッドの定義時の名前を Symbol で返します。 トップレベルであった場合は nil を返します。
...した場合に発生します。
//emlist[][ruby]{
class C
def method_name
end
alias alias_name method_name
end
trace = TracePoint.new(:call) do |tp|
p [tp.method_id, tp.callee_id] # => [:method_name, :alias_name]
end
trace.enable do
C.new.alias_name
end
//}
@see TracePoint#callee_id... -
TracePoint
# parameters -> [object] (7.0) -
現在のフックが属するメソッドまたはブロックのパラメータ定義を返します。 フォーマットは Method#parameters と同じです。
...トのためのイベントフックの外側で実行した場合に発生します。
//emlist[例][ruby]{
def foo(a, b = 2)
end
TracePoint.new(:call) do |tp|
p tp.parameters # => a], [:opt, :b
end.enable do
foo(1)
end
//}
@see Method#parameters, UnboundMethod#parameters, Proc#parameters... -
TracePoint
# path -> String (7.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
# raised _ exception -> Exception (7.0) -
発生した例外を返します。
...eError :raise イベントのためのイベントフックの外側で実行し
た場合に発生します。
//emlist[例][ruby]{
trace = TracePoint.new(:raise) do |tp|
tp.raised_exception # => #<ZeroDivisionError: divided by 0>
end
trace.enable
begin
0/0
rescue
end
//}... -
TracePoint
# return _ value -> object (7.0) -
メソッドやブロックの戻り値を返します。
...timeError :return、:c_return、:b_return イベントのためのイベ
ントフックの外側で実行した場合に発生します。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:return) do |tp|
p tp.return_value # => 1
end
trace.enable
foo 1
//}...