[#1551] Hashes as keys — "Nathaniel Talbott" <nathaniel@...>

I was just playing around with Hash#hash and discovered that you can't use a

13 messages 2003/09/23

Re: why does it take so long?

From: matz@... (Yukihiro Matsumoto)
Date: 2003-09-11 02:49:08 UTC
List: ruby-core #1528
Hi,

In message "why does it take so long?"
    on 03/09/11, Mathieu Bouchard <matju@sympatico.ca> writes:

|time ruby -e '(3**40000)'
|user    0m0.200s
|
|time ruby -e '(3**40000).zz'
|-e:1: undefined method `zz' for #<Bignum:0x804c3a8> (NoMethodError)
|user    0m1.610s
|
|this is quite strange. any explanations?

Error print routine tries "inspect" first, then when it's too long, use
shorter form "#<Bignum:0x804c3a8>".

							matz.

In This Thread

Prev Next