るりまサーチ

最速Rubyリファレンスマニュアル検索!
14件ヒット [1-14件を表示] (0.055秒)
トップページ > クエリ:-[x] > 種類:特異メソッド[x] > クエリ:verbose[x] > ライブラリ:ビルトイン[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

クラス

検索結果

Proc.new -> Proc (109.0)

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

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

ブロックを指定しない場合、Ruby 2.7 では
$VERBOSE = true のときには警告メッセージ
「warning: Capturing the given block using Proc.new is deprecated; use `&block` instead」
が出力...
...ArgumentError が発生します。

//emlist[例][ruby]{
def foo
Proc.new
end
foo
# => -:2:in `new': tried to create Proc object without a block (ArgumentError)
# from -:2:in `foo'
# from -:4:in `<main>'
//}

Proc.new は、Proc#initialize が定義されていれば
オブジェ...

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

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

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

ブロックを指定しない場合、Ruby 2.7 では
$VERBOSE = true のときには警告メッセージ
「warning: Capturing the given block using Proc.new is deprecated; use `&block` instead」
が出力...
...ArgumentError が発生します。

//emlist[例][ruby]{
def foo
Proc.new
end
foo
# => -:2:in `new': tried to create Proc object without a block (ArgumentError)
# from -:2:in `foo'
# from -:4:in `<main>'
//}

Proc.new は、Proc#initialize が定義されていれば
オブジェ...