Hi,

I wrote a patch of ObjectSpace.reference_form(obj).  This method returns
references that this object has.

example:
require 'objspace'

h = {'a' => [1, 2, 3], 'b' => Object.new}
p ObjectSpace.reference_from(h)

#=>

{76577650=>Hash, 76559320=>"a", 76559360=>[1, 2, 3], 76559310=>"b",
76559340=>#<Object:0x92067d8>}

Hash keys are object id and values are objects themselves.


Patch:
  http://www.atdot.net/sp/view/apl9sl/readonly


How about it?  Good name is also welcome.


# Flight from Porland to New Orleans hack.

-- 
// SASADA Koichi at atdot dot net