るりまサーチ

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

別のキーワード

  1. _builtin to_proc
  2. _builtin proc
  3. proc curry
  4. httpserver mount_proc
  5. readline completion_proc

種類

キーワード

検索結果

irb (39634.0)

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

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

=== irb の使い方

Ruby さえ知っていれば irb を使うのは簡単です。
irb
コマンドを実行すると、以下のようなプロン...
... irb を起動するたびに設定を入力するのは面倒です。
そこで、IRB.conf[:IRB_RC] を使う方法を紹介します。

IRB
.conf[:IRB_RC] に Proc オブジェクトを設定しておくと、
サブ irb が起動されるたびに、その Proc オブジェクトに
IRB
::Cont...
...ってサブ irb の設定をまとめて設定することができます。

以下に例を示します。

$ irb
irb
(main):001:0> IRB.conf[:IRB_RC] = lambda {|conf| conf.prompt_i = "> " }
=> #<Proc:0x00002a95fa3fd8@(irb):2>
irb
(main):002:0> irb
>

=== irb の使用例

irb
のいろい...

NEWS for Ruby 2.7.0 (102.0)

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

...==== ブロックなしの proc/lambda が deprecated

* ブロック付きで呼び出されたメソッドの中で、ブロックなしでProc.newやKernel#proc
呼び出すと警告が表示されるようになりました。

//emlist[][ruby]{
def foo
proc

end
foo { puts "Hello" }...
...#=> warning: Capturing the given block using Kernel#proc is deprecated; use `&block` instead
//}

* 非推奨に関する警告を止めたい場合は、コマンドライン引数に
「-W:no-deprecated」を指定するか、コードの中で
「Warning[:deprecated] = false」
...
...るようになりました。

* ERB
* ERBのインスタンスをMarshalできないようになりました。

* IRB
* Pry gem に着想を得て、Binding#irbのソース表示、REPLの入力、
いくつかのコアクラスオブジェクトのinspect出力に
シン...

NEWS for Ruby 3.0.0 (72.0)

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

...ror or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now matches the behavior of Procs
accepting a single rest argument and no keywords.
16166

//emlist[][ruby]{
pr = proc{|*a, **kw| [a, kw]}

pr.call([1])...
...* 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
* Kernel.sleep invokes the scheduler hook `#kernel_sleep(...)` in a non-blocking execution...
...Ractor compatible.
* Etc
* Update to Etc 1.2.0
* This version is Ractor compatible.
* Fiddle
* Update to Fiddle 1.0.5
* IRB
* Update to IRB 1.2.6
* JSON
* Update to JSON 2.5.0
* This version is Ractor compatible.
* Set
* Update to set 1.0.0
* SortedSet has...