-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Truffle] Add Rails app integration test #3691
Conversation
@@ -671,7 +671,7 @@ private Object classEvalSource(DynamicObject module, DynamicObject code, String | |||
|
|||
CompilerDirectives.transferToInterpreter(); | |||
// TODO (pitr 15-Oct-2015): fix this ugly hack, required for AS | |||
final String space = new String(new char[line-1]).replace("\0", "\n"); | |||
final String space = new String(new char[Integer.max(line - 1, 0)]).replace("\0", "\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to be Math.max
on Java 7 - that's why Travis has failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it has to, I was just looking at Travis.
I guess the commented out code is because this is from a Rails generated template app? Great work, Petr. |
yes, I think all comments in rails directory are from the rails generator. |
Great work on the compatibility everyone! It worked almost out of the box :) |
@@ -42,6 +43,11 @@ public PackNode(RubyContext context) { | |||
this.context = context; | |||
} | |||
|
|||
@CompilerDirectives.TruffleBoundary | |||
public static Encoding getAscii() { | |||
return Encoding.load("ASCII"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ASCIIEncoding.INSTANCE maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
440c444
to
d4e1243
Compare
@@ -128,6 +128,10 @@ public void printBacktrace(RubyContext context, DynamicObject exception, Backtra | |||
private String formatInLine(List<Activation> activations, DynamicObject exception) { | |||
final StringBuilder builder = new StringBuilder(); | |||
|
|||
if (activations.size() == 0) { | |||
throw new UnsupportedOperationException(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the message field to explain why it's unsupported.
Looks great! |
9f2a71b
to
1d4c8c0
Compare
[Truffle] Add Rails app integration test
cc @jruby/truffle