るりまサーチ (Ruby 3.3)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.058秒)
トップページ > クエリ:Kernel.#p[x] > クエリ:Float[x] > クエリ:binding[x] > クエリ:cpp_command[x] > クラス:Proc[x] > バージョン:3.3[x]

別のキーワード

  1. _builtin float
  2. fiddle align_float
  3. float to_d
  4. float rationalize
  5. fiddle type_float

ライブラリ

検索結果

Proc.new { ... } -> Proc (9340.0)

ブロックをコンテキストとともにオブジェクト化して返します。

...行ったときに発生します。

//emlist[][ruby]{
pr = Proc.new {|arg| p arg }
pr.call(1) # => 1
//}

//emlist[][ruby]{
Proc
.new # => -e:1:in `new': tried to create Proc object without a block (ArgumentError)
//}

Proc
.new は、Proc#initialize が定義されていれば
オブジェクトの...
...初期化のためにこれを呼び出します。このことを
除けば、Kernel.#proc と同じです。...