るりまサーチ

最速Rubyリファレンスマニュアル検索!
37件ヒット [1-37件を表示] (0.012秒)
トップページ > クエリ:binding[x] > クエリ:Context[x]

別のキーワード

  1. _builtin binding
  2. binding eval
  3. kernel binding
  4. proc binding
  5. tracepoint binding

種類

ライブラリ

キーワード

検索結果

IRB::Context (18066.0)

irb の設定を扱うためのクラスです。

...更の内容は反
映されない事に注意してください。

なお、.irbrc 中に記述できる以下の設定値については、IRB::Context
オブジェクトのメソッドとして操作できません。

: IRB.conf[:AT_EXIT]

irb の終了時(サブ irb を含みません)に本...
...RB.conf[:CONTEXT_MODE]

新しいワークスペースを作成した時(サブ irb の起動や pushws した時)に、
ワークスペースに関連する Binding オブジェクトの作成方法を
Integer で設定します。

0 を指定した場合、Object::TOPLEVEL_BINDING の Pro...
...1 を指定した場合、Tempfile 中の
Binding
を使用します。2 を指定した場合、Thread 内で読み込
んだファイル中の Binding を使用します。3 を指定した場合、
Object::TOPLEVEL_BINDING の関数中の Binding を使用します。

ただし、IRB.con...

irb (96.0)

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

...行なう。デフォルト値は 16。
--context-mode n 新しいワークスペースを作成した時に関連する Binding
オブジェクトの作成方法を 0 から 3 で設定する。
(IRB::Context 参照)
--single-irb irb 中で self を...
...IRB.conf[:USE_READLINE] = nil
IRB.conf[:USE_TRACER] = true
IRB.conf[:VERBOSE] = true

それぞれの設定値の詳細については、IRB::Context を参照してください。

====[a:customize_prompt] プロンプトのカスタマイズ

irb のプロンプトをカスタマイズした...
...が使えます。
フォーマット文字列で使用可能な記法は以下の通りです。

: %N
起動しているコマンド名(IRB::Context#irb_name)
: %m
main オブジェクト (self) を to_s した文字列
: %M
main オブジェクト (self) を inspect した文字列
:...

NEWS for Ruby 3.0.0 (48.0)

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

..."]
//}

* 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 invoke the `block`/`unblock` scheduler hooks in a non-blocking context. 16786...
...or Encoding.default_external to UTF-8 on Windows 16604
* Fiber
* Fiber.new(blocking: true/false) allows you to create non-blocking execution contexts. 16786
* Fiber#blocking? tells whether the fiber is non-blocking. 16786
* Fiber#backtrace and Fiber#backtrace_locations provide per-fibe...
...#write and other related methods (e.g. IO#puts, IO#gets) may invoke the scheduler hook `#io_wait(io, events, timeout)` in a non-blocking execution context. 16786
* Kernel
* Kernel#clone when called with the `freeze: false` keyword will call `#initialize_clone` with the `freeze: false` keyword....

irb/xmp (18.0)

Ruby のソースコードとその実行結果を、行ごとに交互に表示するためのライブ ラリです。irb を実行しなくても、使用することが出来ます。

...
法があります。どちらの場合も XMP がコンテキスト情報を保持するため、
実行結果に差分はありません。(Binding を指定できるタイミングは違い
ます)

=== 関数(Kernel#xmp)を使って実行結果を得る

Kernel#xmp では、以下のよう...
...テキストで評価します。

例:

xmp "foo", an_binding

[注意] マルチスレッドには対応していません。

=== 注意

irb/xmp は内部で irb を使用する事で実行結果を表示しています
(IRB::Context#prompt_mode で選択できる :XMP モードはそのため...