517件ヒット
[1-100件を表示]
(0.098秒)
クラス
- Binding (78)
- ERB (33)
-
IRB
:: Frame (55) - Object (11)
- Proc (11)
-
RubyVM
:: InstructionSequence (11) - Socket (11)
- Thread (49)
- TracePoint (11)
- Tracer (33)
- XMP (11)
モジュール
- Kernel (33)
- ObjectSpace (33)
-
Socket
:: Constants (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - Binding (11)
-
IP
_ FREEBIND (22) -
NEWS for Ruby 2
. 2 . 0 (10) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (4) - Ruby プログラムの実行 (11)
-
TOPLEVEL
_ BINDING (11) -
add
_ filter (22) -
add
_ trace _ func (11) - backtrace (11)
- bottom (22)
-
count
_ tdata _ objects (11) -
define
_ finalizer (22) - eval (22)
- irb (19)
-
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) - 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)
-
set
_ trace _ func (11) -
source
_ location (6) - top (22)
-
trace
_ func (22) - xmp (11)
検索結果
先頭5件
-
Kernel
. # binding -> Binding (24430.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... -
TracePoint
# binding -> Binding | nil (24430.0) -
発生したイベントによって生成された Binding オブジェクトを返します。
...生成された Binding オブジェクトを返します。
C で記述されたメソッドは binding を生成しないため、
:c_call および :c_return イベントに対しては nil を返すことに注意してください。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePo......int.new(:call) do |tp|
p tp.binding.local_variables # => [:ret]
end
trace.enable
foo 1
//}... -
Proc
# binding -> Binding (24424.0) -
Proc オブジェクトが保持するコンテキストを Binding オブジェクトで返します。
...Proc オブジェクトが保持するコンテキストを
Binding オブジェクトで返します。
//emlist[例][ruby]{
def fred(param)
proc {}
end
sample_proc = fred(99)
eval("param", sample_proc.binding) # => 99
//}... -
TracePoint
# binding -> Binding (24424.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
//}... -
Binding
# local _ variable _ defined?(symbol) -> bool (15130.0) -
引数 symbol で指定した名前のローカル変数が定義されている場合に true を、 そうでない場合に false を返します。
...[例][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#local_varia......ble_get, Binding#local_variable_set... -
Object
:: TOPLEVEL _ BINDING -> Binding (12424.0) -
トップレベルでの Binding オブジェクト。
...トップレベルでの Binding オブジェクト。
詳細は Binding を参照してください。... -
static VALUE proc
_ binding(VALUE proc) (12200.0) -
-
static VALUE rb
_ f _ binding(VALUE self) (12200.0) -
-
Binding
# local _ variable _ get(symbol) -> object (12030.0) -
引数 symbol で指定した名前のローカル変数に設定された値を返します。
...][ruby]{
def foo
a = 1
binding.local_variable_get(:a) # => 1
binding.local_variable_get(:b) # => NameError
end
//}
このメソッドは以下のコードの短縮形です。
//emlist[][ruby]{
binding.eval("#{symbol}")
//}
@see Binding#local_variable_set, Binding#local_variable_defined?... -
Binding
# local _ variable _ set(symbol , obj) (12030.0) -
引数 symbol で指定した名前のローカル変数に引数 obj を設定します。
...[例][ruby]{
def foo
a = 1
bind = binding
bind.local_variable_set(:a, 2) # set existing local variable `a'
bind.local_variable_set(:b, 3) # create new local variable `b'
# `b' exists only in binding
p bind.local_variable_get(:a) # => 2
p bind.local_varia......# => NameError
end
//}
このメソッドは以下のコード(ただし、obj が Ruby のコードで出力される場
合)と同様の動作をします。
//emlist[][ruby]{
binding.eval("#{symbol} = #{obj}")
//}
@see Binding#local_variable_get, Binding#local_variable_defined?... -
Binding (12024.0)
-
ローカル変数のテーブルと self、モジュールのネストなどの情報を保 持するオブジェクトのクラスです。
...トのクラスです。
組み込み関数 Kernel.#binding と Proc#binding によっ
てのみ生成され、Kernel.#eval の第 2 引数に使用します。
またトップレベルの Binding オブジェクトとして組み込み定数
Object::TOPLEVEL_BINDING が用意されています。...