ruby-changes:64727
From: Nobuyoshi <ko1@a...>
Date: Mon, 4 Jan 2021 15:54:45 +0900 (JST)
Subject: [ruby-changes:64727] 8da7f4abc7 (master): [DOC] Update Proc.new without a block [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=8da7f4abc7 From 8da7f4abc779c6549833d718336d75aac98494b8 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Mon, 4 Jan 2021 15:50:30 +0900 Subject: [DOC] Update Proc.new without a block [ci skip] [Feature #10499] [Feature #15554] diff --git a/proc.c b/proc.c index 8a0a0c0..d087004 100644 --- a/proc.c +++ b/proc.c @@ -799,18 +799,15 @@ proc_new(VALUE klass, int8_t is_lambda, int8_t kernel) https://github.com/ruby/ruby/blob/trunk/proc.c#L799 /* * call-seq: * Proc.new {|...| block } -> a_proc - * Proc.new -> a_proc * - * Creates a new Proc object, bound to the current context. Proc::new - * may be called without a block only within a method with an - * attached block, in which case that block is converted to the Proc - * object. + * Creates a new Proc object, bound to the current context. * - * def proc_from - * Proc.new - * end - * proc = proc_from { "hello" } + * proc = Proc.new { "hello" } * proc.call #=> "hello" + * + * Raises ArgumentError if called without a block. + * + * Proc.new #=> ArgumentError */ static VALUE -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/