Created
February 18, 2010 16:46
-
-
Save yokolet/307821 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
ManyVarsDynamicScope getManyVarsDynamicScope(Ruby runtime, int depth) { | |
ManyVarsDynamicScope scope; | |
ThreadContext context = runtime.getCurrentContext(); | |
DynamicScope currentScope = context.getCurrentScope(); | |
String[] names4Injection = container.getVarMap().getLocalVarNames(); | |
if (names4Injection == null || names4Injection.length == 0) { | |
scope = | |
new ManyVarsDynamicScope(new EvalStaticScope(currentScope.getStaticScope()), currentScope); | |
} else { | |
scope = | |
new ManyVarsDynamicScope(new EvalStaticScope(currentScope.getStaticScope(), names4Injection), currentScope); | |
} | |
return scope; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment