[#61822] Plan Developers Meeting Japan April 2014 — Zachary Scott <e@...>
I would like to request developers meeting around April 17 or 18 in this mo=
14 messages
2014/04/03
[#61825] Re: Plan Developers Meeting Japan April 2014
— Urabe Shyouhei <shyouhei@...>
2014/04/03
It's good if we have a meeting then.
[#61826] Re: Plan Developers Meeting Japan April 2014
— Zachary Scott <e@...>
2014/04/03
Regarding openssl issues, I=E2=80=99ve discussed possible meeting time with=
[#61833] Re: Plan Developers Meeting Japan April 2014
— Martin Bo煬et <martin.bosslet@...>
2014/04/03
Hi,
[#61847] Re: Plan Developers Meeting Japan April 2014
— Eric Wong <normalperson@...>
2014/04/03
Martin Boテ殕et <[email protected]> wrote:
[#61849] Re: Plan Developers Meeting Japan April 2014
— Zachary Scott <e@...>
2014/04/04
I will post summary of meeting on Google docs after the meeting.
[#61852] Re: Plan Developers Meeting Japan April 2014
— Eric Wong <normalperson@...>
2014/04/04
Zachary Scott <[email protected]> wrote:
[#61860] Re: Plan Developers Meeting Japan April 2014
— Zachary Scott <e@...>
2014/04/04
I=E2=80=99m ok with redmine, thanks for bringing up your concern!
[#62076] Candidacy to 2.1 branch maintainer. — Tomoyuki Chikanaga <nagachika00@...>
Hello,
7 messages
2014/04/17
[#62078] Re: Candidacy to 2.1 branch maintainer.
— SHIBATA Hiroshi <shibata.hiroshi@...>
2014/04/17
> And does anyone have counter proposal for 2.1 maintenance?
[ruby-core:62214] [ruby-trunk - Feature #9783] [PATCH] Add Method#curry
From:
arne@...
Date:
2014-04-29 07:29:53 UTC
List:
ruby-core #62214
Issue #9783 has been updated by Arne Brasseur. File 0001-Implement-Method-curry-which-delegates-to-to_proc.cu.patch added Updated the patch with documentation. There's an interesting side effect to be considered. `Method#to_proc` returns a lambda that checks its arity. `Proc#curry` takes an optional `arity` argument. If this doesn't match the method's arity then the result can not be called. ~~~ def two_args(a,b) end curried = method(:two_args).to_proc.curry(1) curried.(1) # -:4:in `curry': wrong number of arguments (1 for 2) (ArgumentError) # from -:4:in `<main>' curried.(1, 2) # -:4:in `curry': wrong number of arguments (1 for 2) (ArgumentError) # from -:4:in `<main>' curried.(1, 2, 3) # -:4:in `curry': wrong number of arguments (1 for 2) (ArgumentError) # from -:4:in `<main>' ~~~ In the case of a method with variable arguments the arity argument is important though, because otherwise the currying has no effect. ~~~ def varargs(*args) args end curried = method(:varargs).to_proc.curry curried.(1) # => [1] curried.(1,2) # => [1, 2] curried = method(:varargs).to_proc.curry(3) curried.(1) # => #<Proc:0x007f0cb8fc6fe0 (lambda)> curried.(1).(2).(3) # => [1, 2, 3] ~~~ I think it would make sense for a `Method#curry` method to raise an error or at least give a warning when passing the wrong arity to a fixed-arity function. ---------------------------------------- Feature #9783: [PATCH] Add Method#curry https://bugs.ruby-lang.org/issues/9783#change-46364 * Author: Arne Brasseur * Status: Open * Priority: Normal * Assignee: * Category: core * Target version: ---------------------------------------- There is already Proc#curry, but to curry a method you need to go through to_proc. This patch adds `Method#curry` which delegates to `method.to_proc.curry`. Looking forward to seeing this discussed. ---Files-------------------------------- 0001-Implement-Method-curry-which-delegates-to-to_proc.cu.patch (1.86 KB) 0001-Implement-Method-curry-which-delegates-to-to_proc.cu.patch (3.19 KB) -- https://bugs.ruby-lang.org/