[jruby-joni] 17/194: use isUnicode

Hideki Yamane henrich at moszumanska.debian.org
Thu Feb 1 12:04:09 UTC 2018


This is an automated email from the git hooks/post-receive script.

henrich pushed a commit to branch debian/sid
in repository jruby-joni.

commit a06127ed2197ad6833662d3d94e6b9b855898be1
Author: Marcin Mielzynski <lopx at gazeta.pl>
Date:   Sun Dec 17 21:22:19 2017 +0100

    use isUnicode
---
 src/org/joni/Parser.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/org/joni/Parser.java b/src/org/joni/Parser.java
index 172796b..ffe80c6 100644
--- a/src/org/joni/Parser.java
+++ b/src/org/joni/Parser.java
@@ -851,7 +851,7 @@ class Parser extends Lexer {
             right.bs.setRange(0x0A, 0x0D);
         }
 
-        if (enc.toString().startsWith("UTF")) {
+        if (enc.isUnicode()) {
             /* UTF-8, UTF-16BE/LE, UTF-32BE/LE */
             right.addCodeRange(env, 0x85, 0x85);
             right.addCodeRange(env, 0x2028, 0x2029);
@@ -864,7 +864,7 @@ class Parser extends Lexer {
 
     private Node parseExtendedGraphemeCluster(Node node) {
         if (Config.USE_UNICODE_PROPERTIES) {
-            if (enc instanceof UnicodeEncoding) {
+            if (enc.isUnicode()) {
                 int ctype = enc.propertyNameToCType(new byte[]{(byte)'M'}, 0, 1);
                 if (ctype > 0) {
                     CClassNode cc1 = new CClassNode(); /* \P{M} */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jruby-joni.git



More information about the pkg-java-commits mailing list