Skip to content

Commit

Permalink
Fix 1.8 symbol compilation after encoding change. Fixes #2307.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Dec 11, 2014
1 parent a80096f commit 81879f1
Showing 1 changed file with 10 additions and 2 deletions.
Expand Up @@ -169,12 +169,20 @@ public void cacheSymbol(BaseBodyCompiler method, String symbol, Encoding encodin
method.loadThreadContext();
if (index < AbstractScript.NUMBERED_SYMBOL_COUNT) {
method.method.ldc(symbol);
method.method.ldc(encoding.toString());
if (encoding == null) {
method.method.aconst_null();
} else {
method.method.ldc(encoding.toString());
}
method.method.invokevirtual(scriptCompiler.getClassname(), "getSymbol" + index, sig(RubySymbol.class, ThreadContext.class, String.class, String.class));
} else {
method.method.ldc(index.intValue());
method.method.ldc(symbol);
method.method.ldc(encoding.toString());
if (encoding == null) {
method.method.aconst_null();
} else {
method.method.ldc(encoding.toString());
}
method.method.invokevirtual(scriptCompiler.getClassname(), "getSymbol", sig(RubySymbol.class, ThreadContext.class, int.class, String.class, String.class));
}
}
Expand Down

0 comments on commit 81879f1

Please sign in to comment.