Skip to content

Commit

Permalink
[Truffle] Use default_external encoding for output of backtick method.
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvdrum committed Nov 15, 2016
1 parent aba18f3 commit c870328
Showing 1 changed file with 1 addition and 3 deletions.
Expand Up @@ -268,9 +268,7 @@ private ExecuteResult spawnAndCaptureOutput(DynamicObject command, final Dynamic
}

final int code = getContext().getThreadManager().runUntilResult(this, () -> process.waitFor());

// TODO (nirvdrum 10-Mar-15) This should be using the default external encoding, rather than hard-coded to UTF-8.
final DynamicObject output = createString(baos.toByteArray(), EncodingOperations.getEncoding(getContext().getEncodingManager().getRubyEncoding("UTF-8")));
final DynamicObject output = createString(baos.toByteArray(), getContext().getEncodingManager().getDefaultExternalEncoding());

// TODO CS 30-Oct-16 how to get the PID? JRuby does some gymnastics with reflection. I think we
// should probably reimplement this in Ruby using spawn, which starts processes with JNR and so
Expand Down

0 comments on commit c870328

Please sign in to comment.