Skip to content

Instantly share code, notes, and snippets.

@brainopia
Last active November 6, 2015 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save brainopia/d44476f93880694d5205 to your computer and use it in GitHub Desktop.
Save brainopia/d44476f93880694d5205 to your computer and use it in GitHub Desktop.
require 'fiddle'
A = Class.new
B = Class.new
C = Class.new A
p C.superclass # => A
(Fiddle::Pointer[Fiddle.dlwrap C] + 16)[0, 8] = Fiddle::Pointer[Fiddle.dlwrap B].ref
p C.superclass # => B
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment