I
Iain Barnett
Hi,
If I've written a class method that calls itself recursively is there a =
problem or any difference between doing something like this:
class << self
def mymeth( n )
blah blah...
=20
mymeth( n + 1)
end
end
as opposed to this?
class << self
def mymeth( n )
blah blah...
Classname.mymeth( n + 1 )
end
end
I wrote something a few minutes ago in the first way, and it works =
(those virgin sacrifices must be working their magic) but wondered if =
that's A Really Bad Thing To Do=99, or if it's more like wearing socks =
with sandals on a warm day?
Regards,
Iain
If I've written a class method that calls itself recursively is there a =
problem or any difference between doing something like this:
class << self
def mymeth( n )
blah blah...
=20
mymeth( n + 1)
end
end
as opposed to this?
class << self
def mymeth( n )
blah blah...
Classname.mymeth( n + 1 )
end
end
I wrote something a few minutes ago in the first way, and it works =
(those virgin sacrifices must be working their magic) but wondered if =
that's A Really Bad Thing To Do=99, or if it's more like wearing socks =
with sandals on a warm day?
Regards,
Iain