Aaron Patterson <aaron_patterson / speakeasy.net> wrote/schrieb <20070128190516.GA5600 / eviladmins.lan>:

> def f(oi)
>   g = [false, nil]
>   ObjectSpace.each_object { |a|
>     g = [true, a] if a.object_id == oi
>   }
>   g
> end

Thanks, but:
4.object_id
=> 9
f(9)
=> [false, nil]
I'd expect [true,4], instead.

Regards
  Thomas