るりまサーチ

最速Rubyリファレンスマニュアル検索!
277件ヒット [101-200件を表示] (0.023秒)

別のキーワード

  1. _builtin binding
  2. proc binding
  3. kernel binding
  4. binding local_variable_set

検索結果

<< < 1 2 3 > >>

Binding#local_variables -> [Symbol] (9018.0)

ローカル変数の一覧を Symbol の配列で返します。

...カル変数の一覧を Symbol の配列で返します。

//emlist[例][ruby]{
def foo
a = 1
2.times do |n|
binding
.local_variables #=> [:a, :n]
end
end
//}

このメソッドは以下のコードと同様の動作をします。

//emlist[][ruby]{
binding
.eval("local_variables")
//}...

Binding#receiver -> object (9012.0)

保持するコンテキスト内での self を返します。

...保持するコンテキスト内での self を返します。

このメソッドは以下のコードと同様の動作をします。

//emlist[][ruby]{
binding
.eval("self")
//}...

Binding (6030.0)

ローカル変数のテーブルと self、モジュールのネストなどの情報を保 持するオブジェクトのクラスです。

...トのクラスです。

組み込み関数 Kernel.#binding と Proc#binding によっ
てのみ生成され、Kernel.#eval の第 2 引数に使用します。
またトップレベルの Binding オブジェクトとして組み込み定数
Object::TOPLEVEL_BINDING が用意されています。...

Ruby プログラムの実行 (3084.0)

Ruby プログラムの実行 === Ruby プログラム

...ss を継承します。Module#module_eval/class_eval
BasicObject#instance_eval
の三つだけが例外で、以下のように変更されます。

: Module#module_eval, Module#class_eval
self、class ともそのレシーバ
: BasicObject#instance_eval
self がそのレシーバ、cla...
...ss がそのレシーバの特異クラス

==== eval

eval
の第二引数に Proc オブジェクトまたは Binding オブ
ジェクトを与えたときは、その生成時のブロックのうえで文字列を評価します。

==== メソッドの実行

メソッドの実行はフレー...
...にないなら例外 LocalJumpError
を発生します。

next ブロックの終わりまでジャンプ

retry 複雑だ…

==== eval, instance_eval, module_eval

これなんだっけ

=== 代入

代入とは、変数・定数のいずれかにオブジェクトを記憶させることを言...

ruby 1.8.4 feature (102.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...1.8.4 (2005-12-22) [i686-linux]
:foo!
:bar?

4) :$- always treats next character literally:

p eval(":$-\n") # => :"$-\n"
p :$-( # => :"$-("
p :$- # => :"$- "
p :$-#.object_id # => 3950350

# => ru...
...Nov 1 14:20:11 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
#
# * eval.c (rb_call_super): should call method_missing if super is
# called from Kernel method.
#
# * eval.c (exec_under): frame during eval should preserve external
# information.

: super [bug]

Kerne...
...o.
# [ruby-dev:27560] [ruby-core:4627]
#
# ?

#Sat Oct 8 20:04:40 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
#
# * eval.c (Init_Binding): add Binding#dup method. [yarv-dev:666]
#
# メソッドの追加。不要。

#Sat Oct 8 20:04:40 2005 Nobuyoshi Nakada <nobu@ruby-lang.org...

絞り込み条件を変える

irb (90.0)

irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。

...しろから n だけ行なう。デフォルト値は 16。
--context-mode n 新しいワークスペースを作成した時に関連する Binding
オブジェクトの作成方法を 0 から 3 で設定する。
(IRB::Context 参照)
--single-irb...
...れます。

IRB.conf[:AUTO_INDENT] = false
IRB.conf[:BACK_TRACE_LIMIT] = 16
IRB.conf[:DEBUG_LEVEL] = 1
IRB.conf[:ECHO] = nil
IRB.conf[:EVAL_HISTORY] = nil
IRB.conf[:HISTORY_FILE] = nil
IRB.conf[:IGNORE_EOF] = true
IRB.conf[:IGNORE_SIGINT] = true
IRB.conf[:INSPECT_MODE] = nil
IR...
...irb#1(main):001:0> x # x を表示
NameError: undefined local variable or method `x' for main:Object
from (irb#1):1:in `Kernel#binding'

起動時のインタプリタでローカル変数 x を定義しましたが、
「irb」でサブ irb を起動すると、
ローカル変...

NEWS for Ruby 2.1.0 (54.0)

NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...* 追加: Array#to_h キーと値のペアの配列をハッシュに変換します。

* Binding
* 追加: Binding#local_variable_get
* 追加: Binding#local_variable_set
* 追加: Binding#local_variable_defined?

* Enumerable
* 追加: Enumerable#to_h キーと値のペア...
...無視します。

* Kernel.#eval, Kernel.#instance_eval, Module#module_eval
元の環境のスコープ情報をコピーするようになりました。これは、引数なしの
private, protected, public, module_function を文字列として eval しても
その外側には影...
...響を与えないという意味です。
以下のコードは Foo#foo をプライベートにしません。
//emlist{
class Foo
eval
"private"
def foo
end
end
//}

* Object#untrusted?,Object#untrust,Object#trust
* これらのメソッドは非推奨になり...

ruby 1.6 feature (54.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...が定義されていない場合例外 NameError を起こ
すようになりました。((<ruby-bugs-ja:PR#216>))

Object.new.instance_eval {
p remove_instance_variable :@foo
}
=> ruby 1.6.7 (2002-03-01) [i586-linux]
nil

=> -:2:in `remove_ins...
...ule_eval>))

((<Module/module_eval>)) のブロック内で定数やクラス変数のスコープが
変わることはなくなりました。((<ruby-dev:17876>))

class Foo
FOO = 1
@@foo = 1
end

FOO = 2
@@foo = 2

Foo.module_eval {...
...001-10-15) [i586-linux]
MatchData
NotImplementedError
FloatDomainError
LoadError
Float
Binding

SignalException
Module
-:6:in `method_missing': stack level too deep (SystemStackError)

: %q(...)

%...

NEWS for Ruby 2.6.0 (48.0)

NEWS for Ruby 2.6.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...した。 13784

* Binding
* 新規メソッド
* Binding#source_location 追加 14230
* bindingのソースコード上の位置を __FILE__ と __LINE__ の二要素配列として返します。
従来でも eval("[__FILE__, __LINE__]", binding) とすることでこ...
...れらの情報は得られましたが、
将来的に Kernel.#eval binding のソースコード行を無視する変更を予定しているため 4352、
この新しいメソッドを用いることが今後は推奨されます。

* Dir
* 新規メソッド...
...れました。 15287
* 新規メソッド
* TracePoint#parameters 14694
* TracePoint#instruction_sequence 15287
* TracePoint#eval_script 15287
* 変更されたメソッド
* TracePoint#enable がキーワード引数 "target:" と "target_line:" を
受け...

NEWS for Ruby 3.0.0 (36.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...sent and has
a non-empty value, and the standard input and output are tty, the `--help`
option shows the help message via the pager designated by the value.
16754

=== `--backtrace-limit` option

The `--backtrace-limit` option limits the maximum length of a backtrace.
8661

== Core classes updates...
...ata[(1..).step(2)] # take each second element
# => ["data1", "data2", "data3"]
//}

* Binding
* Binding#eval when called with one argument will use `"(eval)"` for `__FILE__` and `1` for `__LINE__` in the evaluated code. 4352 17419
* ConditionVariable
* ConditionVariable#wait may now invo...
...true` keyword, and will return a frozen copy even if the receiver is unfrozen. 16175
* Kernel#eval when called with two arguments will use `"(eval)"` for `__FILE__` and `1` for `__LINE__` in the evaluated code. 4352
* Kernel#lambda now warns if called without a literal block. 15973
* Ker...

絞り込み条件を変える

<< < 1 2 3 > >>