Take me home

Just a little Rubinius trick

Published September 03, 2008

Rubinius can do it all.

def pwn_locals
  MethodContext.current.sender.locals[0] = 666
end

a = 8
pwn_locals
puts a
# => 666

Isn't that just awesome?


Questions or comments?

Feel free to contact me on Twitter, @augustl, or e-mail me at august@augustl.com.