Created
January 2, 2016 22:02
-
-
Save brixen/1278cdaf01a2aa3f9d23 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rbx | |
irb(main):001:0> class A | |
irb(main):002:1> dynamic_method :hello do |g| | |
irb(main):003:2* g.push :self | |
irb(main):004:2> g.push_literal "ELLIOT!!!" | |
irb(main):005:2> g.send :puts, 1, true | |
irb(main):006:2> g.ret | |
irb(main):007:2> end | |
irb(main):008:1> end | |
=> #<Rubinius::CompiledCode hello file=(dynamic)> | |
irb(main):009:0> A.new.hello | |
ELLIOT!!! | |
=> nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment