From: ts Date: 2003-07-20T19:01:30+09:00 Subject: Re: Ruby Golf: Object Diff >>>>> "M" == Mauricio =?iso-8859-1?Q?Fern=E1ndez?= writes: M> It's impossible AFAIK within plain Ruby. You can however write an M> extension to do so, by doing: svg% cat inpf.c #include static VALUE get_address(VALUE class, VALUE obj) { return INT2NUM((long)obj); } void Init_inpf() { rb_define_method(rb_mKernel, "get_address", get_address, 1); } svg% svg% ruby -rinpf -e 'a = ""; p get_address(a); p 2*a.id' 1074371868 1074371868 svg% Guy Decoux p.s. : inpf = "impossible n'est pas francais" :-)