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:
|That class with a test is attached on that mail. Please consider, that
|I had to write a dummy MyInt class, which do the same as the original
|Integer class, as there are no Integer#succ and Integer#pred methods
|with optional stepsize argument. If we already had them, I would not
|need MyInt!
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. :-)
matz.