update Proc#lambda? doc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2007-12-24 06:56:06 +00:00
parent 1c3c98821b
commit e5988f7404
1 changed files with 6 additions and 2 deletions

8
proc.c
View File

@ -115,8 +115,11 @@ proc_clone(VALUE self)
* Such procs are typically generated by lambda.
*
* lambda {}.lambda? => true
* lambda {|a,b| [a,b]}.call(1,2,3) => ArgumentError
*
* proc {}.lambda? => false
* proc {|a,b| [a,b]}.call(1,2,3) => [1,2]
*
* Proc.new {}.lambda? => false
*
* def m() end
@ -124,10 +127,11 @@ proc_clone(VALUE self)
*
* def n(&b) b.lambda? end
* n {} => false
* n(&lambda {}) => true
* n(&method(:m)) => true
* n(&proc {}) => false
* n(&Proc.new {}) => false
* n(&lambda {}) => true
* n(&method(:m)) => true
* n(&method(:m)).to_proc => true
*
*/