https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112011-12-12T06:23:09ZRuby Issue Tracking SystemRuby master - Bug #5746: Proc#curry too strict about lambda's arity.https://redmine.ruby-lang.org/issues/5746?journal_id=227312011-12-12T06:23:09Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<ul></ul><p>Hi,</p>
<p>In message "Re: <a href="/issues/5746">[ruby-core:41594]</a> [ruby-trunk - Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Proc#curry too strict about lambda's arity. (Closed)" href="https://redmine.ruby-lang.org/issues/5746">#5746</a>][Open] Proc#curry too strict about lambda's arity."<br>
on Mon, 12 Dec 2011 02:08:08 +0900, Marc-Andre Lafortune <a href="mailto:ruby-core@marc-andre.ca" class="email">ruby-core@marc-andre.ca</a> writes:</p>
<p>|Currently, Proc#curry raises an error when you attempt to curry a lambda with optional (but limited) arguments:<br>
|<br>
| l = ->(arg = 42) {}<br>
| l.curry(1) # => ArgumentError: wrong number of arguments (1 for 0)</p>
<p>In my opinion, #curry should not rely on #arity at all. Even after<br>
proposed fix, it accepts l.curry(3) which is wrong. It should use<br>
more reliable information such as #parameters.</p>
<pre><code> matz.
</code></pre> Ruby master - Bug #5746: Proc#curry too strict about lambda's arity.https://redmine.ruby-lang.org/issues/5746?journal_id=227322011-12-12T09:53:07ZAnonymous
<ul></ul><p>Hi,</p>
<p>On Sun, Dec 11, 2011 at 4:06 PM, Yukihiro Matsumoto <a href="mailto:matz@ruby-lang.org" class="email">matz@ruby-lang.org</a> wrote:</p>
<blockquote>
<p>Hi,</p>
<p>In message "Re: <a href="/issues/5746">[ruby-core:41594]</a> [ruby-trunk - Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Proc#curry too strict about lambda's arity. (Closed)" href="https://redmine.ruby-lang.org/issues/5746">#5746</a>][Open] Proc#curry too strict about lambda's arity."<br>
  on Mon, 12 Dec 2011 02:08:08 +0900, Marc-Andre Lafortune <a href="mailto:ruby-core@marc-andre.ca" class="email">ruby-core@marc-andre.ca</a> writes:</p>
<p>|Currently, Proc#curry raises an error when you attempt to curry a lambda with optional (but limited) arguments:<br>
|<br>
| Â Â l</p>
</blockquote> Ruby master - Bug #5746: Proc#curry too strict about lambda's arity.https://redmine.ruby-lang.org/issues/5746?journal_id=244682012-03-11T16:59:17Zko1 (Koichi Sasada)
<ul><li><strong>Assignee</strong> set to <i>mame (Yusuke Endoh)</i></li></ul> Ruby master - Bug #5746: Proc#curry too strict about lambda's arity.https://redmine.ruby-lang.org/issues/5746?journal_id=247972012-03-18T18:46:07Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li></ul> Ruby master - Bug #5746: Proc#curry too strict about lambda's arity.https://redmine.ruby-lang.org/issues/5746?journal_id=261582012-04-24T20:20:06Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Assignee</strong> changed from <i>mame (Yusuke Endoh)</i> to <i>matz (Yukihiro Matsumoto)</i></li></ul><p>This issue is blocked by <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Proc#arity doesn't take optional arguments into account. (Closed)" href="https://redmine.ruby-lang.org/issues/5694">#5694</a> which is assigned to matz.<br>
So I'm assigning this to matz.</p>
<p>--<br>
Yusuke Endoh <a href="mailto:mame@tsg.ne.jp" class="email">mame@tsg.ne.jp</a></p> Ruby master - Bug #5746: Proc#curry too strict about lambda's arity.https://redmine.ruby-lang.org/issues/5746?journal_id=280432012-07-14T15:49:04Zko1 (Koichi Sasada)
<ul><li><strong>Assignee</strong> changed from <i>matz (Yukihiro Matsumoto)</i> to <i>nobu (Nobuyoshi Nakada)</i></li></ul> Ruby master - Bug #5746: Proc#curry too strict about lambda's arity.https://redmine.ruby-lang.org/issues/5746?journal_id=281542012-07-17T00:41:04Zmarcandre (Marc-Andre Lafortune)marcandre-ruby-core@marc-andre.ca
<ul><li><strong>Assignee</strong> changed from <i>nobu (Nobuyoshi Nakada)</i> to <i>marcandre (Marc-Andre Lafortune)</i></li></ul> Ruby master - Bug #5746: Proc#curry too strict about lambda's arity.https://redmine.ruby-lang.org/issues/5746?journal_id=356212013-01-25T14:53:06Zmarcandre (Marc-Andre Lafortune)marcandre-ruby-core@marc-andre.ca
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>This was fixed when <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Proc#arity doesn't take optional arguments into account. (Closed)" href="https://redmine.ruby-lang.org/issues/5694">#5694</a> was resolved.</p>