Created
April 22, 2010 22:39
-
-
Save BanzaiMan/375921 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From f841e95ae10406c1ee5decfd55486639d1d34521 Mon Sep 17 00:00:00 2001 | |
| From: Hiro Asari <asari.ruby@gmail.com> | |
| Date: Fri, 16 Apr 2010 22:29:34 -0500 | |
| Subject: [PATCH] Fix JRUBY-4389: Bug in AbstractEncoding? | |
| --- | |
| .../jcodings/specific/NonStrictUTF8Encoding.java | 6 ++++++ | |
| src/org/jcodings/unicode/UnicodeEncoding.java | 2 +- | |
| 2 files changed, 7 insertions(+), 1 deletions(-) | |
| diff --git a/src/org/jcodings/specific/NonStrictUTF8Encoding.java b/src/org/jcodings/specific/NonStrictUTF8Encoding.java | |
| index b1a281c..eee4450 100644 | |
| --- a/src/org/jcodings/specific/NonStrictUTF8Encoding.java | |
| +++ b/src/org/jcodings/specific/NonStrictUTF8Encoding.java | |
| @@ -51,4 +51,10 @@ public final class NonStrictUTF8Encoding extends BaseUTF8Encoding { | |
| }; | |
| public static final NonStrictUTF8Encoding INSTANCE = new NonStrictUTF8Encoding(); | |
| + | |
| + @Override | |
| + public boolean isCodeCType(int code, int ctype) { | |
| + return code >= 0 && super.isCodeCType(code, ctype); | |
| + } | |
| + | |
| } | |
| diff --git a/src/org/jcodings/unicode/UnicodeEncoding.java b/src/org/jcodings/unicode/UnicodeEncoding.java | |
| index f00399c..a856ad9 100644 | |
| --- a/src/org/jcodings/unicode/UnicodeEncoding.java | |
| +++ b/src/org/jcodings/unicode/UnicodeEncoding.java | |
| @@ -45,7 +45,7 @@ public abstract class UnicodeEncoding extends MultiByteEncoding { | |
| // onigenc_unicode_is_code_ctype | |
| @Override | |
| - public final boolean isCodeCType(int code, int ctype) { | |
| + public boolean isCodeCType(int code, int ctype) { | |
| if (Config.USE_UNICODE_PROPERTIES) { | |
| if (ctype <= CharacterType.MAX_STD_CTYPE && code < 256) | |
| return isCodeCTypeInternal(code, ctype); | |
| -- | |
| 1.6.6.1 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment