[#927] UnboundMethod#to_proc — Dave Thomas <dave@...>
I'm wondering what I can do with a Proc generated by
17 messages
2003/04/06
[#929] Re: UnboundMethod#to_proc
— "Chris Pine" <nemo@...>
2003/04/06
----- Original Message -----
[#934] Re: UnboundMethod#to_proc
— Mathieu Bouchard <matju@...>
2003/04/06
[#940] Re: UnboundMethod#to_proc
— chr_news@...
2003/04/07
>
[#941] Re: UnboundMethod#to_proc
— Dave Thomas <dave@...>
2003/04/07
>> If they have diverging interfaces such that the contracts conflict
[#936] docs on implementation of ruby and/or ruby-gc ? — Ruben Vandeginste <Ruben.Vandeginste@...>
4 messages
2003/04/07
[#964] Range in logical context — Dave Thomas <dave@...>
If I run
7 messages
2003/04/16
[#965] Re: Range in logical context
— Mauricio Fern疣dez <batsman.geo@...>
2003/04/16
On Thu, Apr 17, 2003 at 06:10:40AM +0900, Dave Thomas wrote:
[#973] problem with rb_rescue2() ? — Mathieu Bouchard <matju@...>
5 messages
2003/04/19
Unbound methods (again)
From:
Dave Thomas <dave@...>
Date:
2003-04-08 20:41:42 UTC
List:
ruby-core #953
Folks:
You're going to hate this, but there's one more wrinkle with
UnboundMethod and Method. Currently Module.define_method takes a Proc
or a Method; I suspect it should take all three:
class Dave
def dave
end
define_method(:fred, instance_method(:dave))
end
seems like a reasonable thing to do. It's arguable in this case whether
define_method should take a Method object: one the one hand there's no
binding needed, but on the other hand a Method can be converted to a
Proc, and it seems reasonable for define_method to take a proc.
So, I think I'm suggesting that define_method should accept a Proc, a
Method, and an UnboundMethod.
Cheers
Dave