543件ヒット
[1-100件を表示]
(0.093秒)
ライブラリ
クラス
- Binding (78)
- ERB (33)
-
IRB
:: Frame (55) - Object (11)
- Proc (11)
-
RubyVM
:: InstructionSequence (11) - Socket (11)
- Thread (38)
- TracePoint (22)
- Tracer (33)
- XMP (11)
モジュール
- Kernel (33)
- ObjectSpace (33)
-
Socket
:: Constants (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - Binding (11)
- Context (11)
-
IP
_ FREEBIND (22) -
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) -
TOPLEVEL
_ BINDING (11) -
add
_ filter (22) - backtrace (11)
- bottom (22)
-
count
_ tdata _ objects (11) -
define
_ finalizer (22) - eval (22)
- irb (19)
-
irb
/ xmp (11) -
local
_ variable _ defined? (11) -
local
_ variable _ get (11) -
local
_ variable _ set (11) -
local
_ variables (10) - new (22)
- of (11)
-
proc
_ binding (11) -
rb
_ f _ binding (11) -
rb
_ obj _ is _ block (11) - receiver (10)
-
report
_ on _ exception (8) -
report
_ on _ exception= (8) - result (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) - run (11)
- self (11)
-
set
_ trace _ func (11) -
source
_ location (6) - top (22)
-
trace
_ func (22) - tracer (11)
- xmp (11)
検索結果
先頭5件
-
TracePoint
# binding -> Binding | nil (33630.0) -
発生したイベントによって生成された Binding オブジェクトを返します。
...れた Binding オブジェクトを返します。
C で記述されたメソッドは binding を生成しないため、
:c_call および :c_return イベントに対しては nil を返すことに注意してください。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:......call) do |tp|
p tp.binding.local_variables # => [:ret]
end
trace.enable
foo 1
//}... -
TracePoint
# binding -> Binding (33624.0) -
発生したイベントによって生成された Binding オブジェクトを返します。
...発生したイベントによって生成された Binding オブジェクトを返します。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:call) do |tp|
p tp.binding.local_variables # => [:ret]
end
trace.enable
foo 1
//}... -
Kernel
. # binding -> Binding (30630.0) -
変数・メソッドなどの環境情報を含んだ Binding オブジェクトを 生成して返します。通常、Kernel.#eval の第二引数として使います。
...変数・メソッドなどの環境情報を含んだ Binding オブジェクトを
生成して返します。通常、Kernel.#eval の第二引数として使います。
//emlist[例][ruby]{
def foo
a = 1
binding
end
eval("p a", foo) #=> 1
//}
@see Kernel.#eval,Object::TOPLEVEL_BINDING... -
Proc
# binding -> Binding (30624.0) -
Proc オブジェクトが保持するコンテキストを Binding オブジェクトで返します。
...Proc オブジェクトが保持するコンテキストを
Binding オブジェクトで返します。
//emlist[例][ruby]{
def fred(param)
proc {}
end
sample_proc = fred(99)
eval("param", sample_proc.binding) # => 99
//}... -
IRB
:: Frame # trace _ func(event , file , line , id , binding) -> Binding (23302.0) -
ライブラリ内部で使用します。
ライブラリ内部で使用します。 -
IRB
:: Frame # bottom(n = 0) -> Binding (23301.0) -
下から n 番目のコンテキストを取り出します。
...下から n 番目のコンテキストを取り出します。
@param n 取り出すコンテキストを Integer で指定します。n は 0 が最
下位になります。... -
IRB
:: Frame # top(n = 0) -> Binding (23301.0) -
上から n 番目のコンテキストを取り出します。
...上から n 番目のコンテキストを取り出します。
@param n 取り出すコンテキストを Integer で指定します。n は 0 が最
上位になります。... -
IRB
:: Frame . bottom(n = 0) -> Binding (23301.0) -
下から n 番目のコンテキストを取り出します。
...下から n 番目のコンテキストを取り出します。
@param n 取り出すコンテキストを Integer で指定します。n は 0 が最
下位になります。... -
IRB
:: Frame . top(n = 0) -> Binding (23301.0) -
上から n 番目のコンテキストを取り出します。
...上から n 番目のコンテキストを取り出します。
@param n 取り出すコンテキストを Integer で指定します。n は 0 が最
上位になります。... -
IRB
:: Context (23042.0) -
irb の設定を扱うためのクラスです。
...irb の設定を扱うためのクラスです。
irb 中で conf コマンドの戻り値や .irbrc で IRB.conf を操作する事で設定
を変更します。irb の起動後は IRB.conf の内容を更新しても変更の内容は反
映されない事に注意してください。
なお......、.irbrc 中に記述できる以下の設定値については、IRB::Context
オブジェクトのメソッドとして操作できません。
: IRB.conf[:AT_EXIT]
irb の終了時(サブ irb を含みません)に本項目に設定された Proc オ
ブジェクトを実行します。ブ......: IRB.conf[:CONTEXT_MODE]
新しいワークスペースを作成した時(サブ irb の起動や pushws した時)に、
ワークスペースに関連する Binding オブジェクトの作成方法を
Integer で設定します。
0 を指定した場合、Object::TOPLEVEL_BINDING... -
Binding
# local _ variable _ defined?(symbol) -> bool (21130.0) -
引数 symbol で指定した名前のローカル変数が定義されている場合に true を、 そうでない場合に false を返します。
...//emlist[例][ruby]{
def foo
a = 1
binding.local_variable_defined?(:a) # => true
binding.local_variable_defined?(:b) # => false
end
//}
このメソッドは以下のコードの短縮形です。
//emlist[][ruby]{
binding.eval("defined?(#{symbol}) == 'local-variable'")
//}
@see Binding#loc......al_variable_get, Binding#local_variable_set...