On Fri, 2 Feb 2001, Dave Thomas wrote: > > that I'm doing that, but..). Even checking input, I'd really have to > > take the given operations into account as well > > (i.e. (2**(2**(2**(2**(... ), would get hairy. ;) > How about: > timeout(1) do > ans = 1020939**(ARGV[0].to_i) > end This only works because your base is such a number. DON'T try: a = 2**2**29 #=> in `**': tried to allocate too big memory (NoMemoryError) #=> also typically crashes a few processes. b = 2**2**24; nil #=> nil -- computes very quickly (not printing the result) b #=> (never gets to print) matju