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                    `------------------------------'