Skip to content

Instantly share code, notes, and snippets.

Created January 23, 2015 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/ee146cfa6191f8fbb4c8 to your computer and use it in GitHub Desktop.
Save anonymous/ee146cfa6191f8fbb4c8 to your computer and use it in GitHub Desktop.
clm-bshirai:~ bshirai$ rbx
irb(main):001:0> class A
irb(main):002:1> dynamic_method :get_undefined do |g|
irb(main):003:2* g.push_undef
irb(main):004:2> g.ret
irb(main):005:2> end
irb(main):006:1> end
=> #<Rubinius::CompiledCode get_undefined file=(dynamic)>
irb(main):007:0> A.new.get_undefined
=> undefined
irb(main):008:0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment