Bug #5799
Proc#yieldとProc#callの違い
| Status: | Closed | Start date: | 12/23/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 100% |
|
| Category: | - | |||
| Target version: | - | |||
| reporter: | ruby_version: | 1.9.3 |
Description
http://doc.ruby-lang.org/ja/1.9.3/method/Proc/i/yield.html を見ると、
「Proc#call と同じですが、引数の数のチェックを行いません。」とありますが、
lambdaだとcallでもyieldでも引数の数をチェックし、Proc.newだとcallでも
yieldでもチェックしていないように見えます。
ソースを見ても、両方proc_call()が実体のようです。
Associated revisions
History
Updated by ohai (Ippei Obayashi) 4 months ago
- Status changed from Open to Closed
- % Done changed from 0 to 100