Hi,
In message "[ruby-talk:17403] Re: Adding a method to a class at the top-level"
on 01/07/06, Guillaume Cottenceau <gc / mandrakesoft.com> writes:
|> * def Class#method .. end ??
|>
|> "??" means vague possibility. I think I need alternative syntax
|> (using # is confusing with comments).
|
|Yes, I agree, # would be confusing.
|
|Dave talked about `define_method'; is there a mandatory reason why it
|should stay private?
|
|If this is for back-compatibility, we could have a similar method called
|`add_method', a public one.
Since "define_method" is just a cheap imitation of "def", due to
method/block semantics difference (parameter behavior and scope),
I felt it was not worthy to be public.
matz.