Created
December 29, 2011 19:52
-
-
Save jeremyroman/1535904 to your computer and use it in GitHub Desktop.
Testing Rubinius::Generator
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
g = Rubinius::Generator.new | |
g.required_args = 1 | |
g.total_args = 1 | |
g.local_count = 1 | |
g.set_line 1 | |
g.push_local 0 | |
g.ret | |
g.close | |
g.encode | |
meth = g.package(Rubinius::CompiledMethod) | |
meth.scope = Rubinius::StaticScope.of_sender | |
be = Rubinius::BlockEnvironment.new | |
be.under_context binding.variables, meth | |
p be.call(6) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment