|
60 | 60 | import com.oracle.truffle.api.strings.TruffleString;
|
61 | 61 | import com.oracle.truffle.api.strings.TruffleString.ErrorHandling;
|
62 | 62 | import org.jcodings.Encoding;
|
63 |
| -import org.jcodings.specific.USASCIIEncoding; |
64 | 63 | import org.jcodings.specific.UTF8Encoding;
|
65 | 64 | import org.truffleruby.RubyContext;
|
66 | 65 | import org.truffleruby.annotations.SuppressFBWarnings;
|
@@ -464,10 +463,6 @@ protected void setEncoding(TruffleString name) {
|
464 | 463 | setEncoding(newEncoding);
|
465 | 464 | }
|
466 | 465 |
|
467 |
| - private boolean isUTF8Subset(Encoding encoding) { |
468 |
| - return encoding == UTF8Encoding.INSTANCE || encoding == USASCIIEncoding.INSTANCE; |
469 |
| - } |
470 |
| - |
471 | 466 | private RuntimeException argumentError(RubyContext context, String message) {
|
472 | 467 | if (context != null) {
|
473 | 468 | return new RaiseException(context, context.getCoreExceptions().argumentError(message, null));
|
@@ -1400,20 +1395,6 @@ public boolean onMagicComment(String name, TruffleString value) {
|
1400 | 1395 | return false;
|
1401 | 1396 | }
|
1402 | 1397 |
|
1403 |
| - private static boolean isKnownMagicComment(String name) { |
1404 |
| - if (isMagicEncodingComment(name)) { |
1405 |
| - return true; |
1406 |
| - } else if ("frozen_string_literal".equalsIgnoreCase(name)) { |
1407 |
| - return true; |
1408 |
| - } else if ("warn_indent".equalsIgnoreCase(name)) { |
1409 |
| - return true; |
1410 |
| - } else if ("truffleruby_primitives".equalsIgnoreCase(name)) { |
1411 |
| - return true; |
1412 |
| - } else { |
1413 |
| - return false; |
1414 |
| - } |
1415 |
| - } |
1416 |
| - |
1417 | 1398 | public static boolean isMagicEncodingComment(String name) {
|
1418 | 1399 | return "coding".equalsIgnoreCase(name) || "encoding".equalsIgnoreCase(name);
|
1419 | 1400 | }
|
|
0 commit comments