[#407] New feature for Ruby? — Clemens.Hintze@...
Hi all,
27 messages
1999/07/01
[#413] Re: New feature for Ruby?
— matz@... (Yukihiro Matsumoto)
1999/07/01
Hi Clemens,
[#416] Re: New feature for Ruby?
— Clemens Hintze <c.hintze@...>
1999/07/01
On Thu, 01 Jul 1999, Yukihiro Matsumoto wrote:
[#418] Re: New feature for Ruby?
— gotoken@... (GOTO Kentaro)
1999/07/01
Hi
[#426] Re: New feature for Ruby?
— gotoken@... (GOTO Kentaro)
1999/07/02
Hi,
[#427] Re: New feature for Ruby?
— Clemens Hintze <c.hintze@...>
1999/07/02
On Fri, 02 Jul 1999, you wrote:
[#428] Re: New feature for Ruby?
— gotoken@... (GOTO Kentaro)
1999/07/03
Hi,
[#429] Re: New feature for Ruby?
— Clemens Hintze <c.hintze@...>
1999/07/03
On Sat, 03 Jul 1999, you wrote:
[#430] Re: New feature for Ruby?
— gotoken@... (GOTO Kentaro)
1999/07/05
Hi,
[#431] Re: New feature for Ruby?
— Clemens Hintze <c.hintze@...>
1999/07/07
On Mon, 05 Jul 1999, you wrote:
[#440] Now another totally different ;-) — Clemens Hintze <c.hintze@...>
Hi,
21 messages
1999/07/09
[#441] Re: Now another totally different ;-)
— matz@... (Yukihiro Matsumoto)
1999/07/09
Hi,
[#442] Re: Now another totally different ;-)
— Clemens Hintze <c.hintze@...>
1999/07/09
On Fri, 09 Jul 1999, you wrote:
[#452] Re: Now another totally different ;-)
— gotoken@... (GOTO Kentaro)
1999/07/11
Hi,
[#462] Re: Now another totally different ;-)
— matz@... (Yukihiro Matsumoto)
1999/07/12
Hello, there.
[#464] Re: Now another totally different ;-)
— Clemens Hintze <c.hintze@...>
1999/07/12
On Mon, 12 Jul 1999, you wrote:
[#467] Re: Now another totally different ;-)
— matz@... (Yukihiro Matsumoto)
1999/07/12
Hi,
[#468] Re: Now another totally different ;-)
— gotoken@... (GOTO Kentaro)
1999/07/12
In message "[ruby-talk:00467] Re: Now another totally different ;-)"
[#443] — Michael Hohn <hohn@...>
Hello,
26 messages
1999/07/09
[#444] interactive ruby, debugger
— gotoken@... (GOTO Kentaro)
1999/07/09
Hi Michael,
[#448] Re: interactive ruby, debugger
— "NAKAMURA, Hiroshi" <nakahiro@...>
1999/07/10
Hi,
[#450] Re: interactive ruby, debugger
— Clemens Hintze <c.hintze@...>
1999/07/10
On Sat, 10 Jul 1999, you wrote:
[#490] Some questions concerning GC in Ruby extensions — Clemens Hintze <c.hintze@...>
Hi matz,
6 messages
1999/07/14
[#501] Ruby 1.3.5 — Yukihiro Matsumoto <matz@...>
Ruby 1.3.5 is out, check out:
1 message
1999/07/15
[#519] CGI.rb — "Michael Neumann" <neumann@...>
Hi...
7 messages
1999/07/24
[#526] Another way for this? And a new proposal! — Clemens Hintze <c.hintze@...>
Hi,
6 messages
1999/07/25
[ruby-talk:00434] Re: New feature for Ruby?
From:
Clemens Hintze <c.hintze@...>
Date:
1999-07-08 05:14:11 UTC
List:
ruby-talk #434
On Thu, 08 Jul 1999, you wrote: >Hi, > >This is not a comment for your code, sorry. I will check it later. > >In message "[ruby-talk:00431] Re: New feature for Ruby?" > on 99/07/07, Clemens Hintze <c.hintze@gmx.net> writes: > [...] >You can replace the methods of existing class. For exapmle, > > class Integer > def succ(n=1) > ... > end > alias next succ > def pred(n=1) > ... > end > alias prev pred > end > >will do the job for you. Oh, how dynamic Ruby is. :-) :-00000 Woah! T h a t i s w o n d e r f u l !!! :-))))))))))))))))) I didn't know, that this is possible... I did know concerning Singleton methods... but this... <cannot believe what he sees...> But does that mean, I cannot redefine an already defined class? Means, if I want to totaly redefine the class e.g. Regexp. Perhaps use another regexp engine, so nothing from the old class should remain! As I have learned now, it is not enough to simply write class Regexp; ...; end That would only enhanve/modify existant methods of already existant class Regexp, true? What I would have to do in that case? Not that I plan to do so. Only I want to know :-) BTW: I have attached Interval.rb again to that mail. This time with classes Fixnum, Float and String modificated. Now the example looks like it should. Only I would not define a String#pred in Ruby now. Too lazy, sorry! :-) Thanks again for that hint... and, of course, for that feature... and, last but not least, for Ruby! :-))))) > > matz. \cle PS: Would it makes sense to introduce that feature in the Ruby-Manual? Perhaps it is, but I cannot remember I did see that! Furthermore please explain `alias' more a little bit. I could not see from the manual, whether the syntax is `alias old new' or `alias new old'.
Attachments (1)
Interval.rb
(2 KB, application/x-sh)