Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 569ad70571c3
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 134293fce364
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jun 22, 2016

  1. [Truffle] Minor clean-up.

    nirvdrum committed Jun 22, 2016
    Copy the full SHA
    9a0e74d View commit details
  2. Copy the full SHA
    134293f View commit details
Original file line number Diff line number Diff line change
@@ -102,9 +102,9 @@ public Encoding getLocaleEncoding() {

@TruffleBoundary
public static Charset charsetForEncoding(Encoding encoding) {
Charset charset = encoding.getCharset();
final String encodingName = encoding.toString();

if (encoding.toString().equals("ASCII-8BIT")) {
if (encodingName.equals("ASCII-8BIT")) {
return Charset.forName("ISO-8859-1");
}

@@ -113,7 +113,7 @@ public static Charset charsetForEncoding(Encoding encoding) {
}

try {
return Charset.forName(encoding.toString());
return Charset.forName(encodingName);
} catch (UnsupportedCharsetException uce) {
throw new UnsupportedOperationException("no java.nio.charset.Charset found for encoding `" + encoding.toString() + "'", uce);
}
Original file line number Diff line number Diff line change
@@ -45,12 +45,4 @@ public ForeignAccess getForeignAccessFactory(DynamicObject object) {
return RubyMessageResolutionAccessor.ACCESS;
}

public static boolean isInstance(TruffleObject object) {
return RubyGuards.isRubyBasicObject(object);
}

private RubyContext getContext() {
return Layouts.MODULE.getFields(Layouts.BASIC_OBJECT.getLogicalClass(this)).getContext();
}

}