From: "Brian F. Feldman" Date: 2001-09-26T23:30:20+09:00 Subject: [ruby-talk:21722] Re: manipulating "immutable" objects such as Fixnum from within callbacks & al... Here's an easy one: class Ptr def initialize(obj) @obj = obj end def []=() @obj = obj end def []() @obj end end module Kernel def _ptr() Ptr.new(self) end end Then you just do stuff like: def foo(int) int[] += 1 end x = 1._ptr foo(x) puts x[] Of course, this used to work and it seems it just crashes Ruby now.... -- Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! / green@FreeBSD.org `------------------------------'