Skip to content
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

Merged
merged 17 commits into from
Mar 1, 2016
Merged

Conversation

pitr-ch
Copy link
Member

@pitr-ch pitr-ch commented Feb 22, 2016

cc @jruby/truffle

@pitr-ch pitr-ch self-assigned this Feb 22, 2016
@pitr-ch pitr-ch added this to the truffle-dev milestone Feb 22, 2016
@@ -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");
Copy link
Contributor

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.

Copy link
Member Author

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.

@chrisseaton
Copy link
Contributor

I guess the commented out code is because this is from a Rails generated template app?

Great work, Petr.

@pitr-ch
Copy link
Member Author

pitr-ch commented Feb 22, 2016

yes, I think all comments in rails directory are from the rails generator.

@pitr-ch
Copy link
Member Author

pitr-ch commented Feb 22, 2016

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");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ASCIIEncoding.INSTANCE maybe?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@pitr-ch pitr-ch force-pushed the rails branch 2 times, most recently from 440c444 to d4e1243 Compare February 26, 2016 15:00
@@ -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();
Copy link
Contributor

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.

@nirvdrum
Copy link
Contributor

Looks great!

@pitr-ch pitr-ch force-pushed the rails branch 4 times, most recently from 9f2a71b to 1d4c8c0 Compare March 1, 2016 14:20
pitr-ch pushed a commit that referenced this pull request Mar 1, 2016
[Truffle] Add Rails app integration test
@pitr-ch pitr-ch merged commit 937d51f into jruby:master Mar 1, 2016
@enebo enebo added this to the Non-Release milestone Dec 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants