[Git][java-team/jruby-joni][master] 6 commits: back off Search.BM_IC and Search.BM_NOT_REV_IC until we find a solution for #25

Hideki Yamane gitlab at salsa.debian.org
Mon Oct 8 19:02:54 BST 2018


Hideki Yamane pushed to branch master at Debian Java Maintainers / jruby-joni


Commits:
118dbdee by Marcin Mielzynski at 2018-10-03T16:25:16Z
back off Search.BM_IC and Search.BM_NOT_REV_IC until we find a solution for #25

- - - - -
3856aadd by Marcin Mielzynski at 2018-10-03T16:39:15Z
[maven-release-plugin] prepare release joni-2.1.24

- - - - -
4a2da27c by Marcin Mielzynski at 2018-10-03T16:39:24Z
[maven-release-plugin] prepare for next development iteration

- - - - -
fd9165ff by Marcin Mielzynski at 2018-10-03T16:59:26Z
cover two more error exceptions

- - - - -
c2c03e70 by Marcin Mielzynski at 2018-10-03T18:19:55Z
reverse test

- - - - -
e9c75c0f by Marcin Mielzynski at 2018-10-03T18:59:05Z
remove unused var

- - - - -


5 changed files:

- pom.xml
- src/org/joni/Lexer.java
- src/org/joni/Regex.java
- test/org/joni/test/TestError.java
- test/org/joni/test/TestU8.java


Changes:

=====================================
pom.xml
=====================================
@@ -4,7 +4,7 @@
   <groupId>org.jruby.joni</groupId>
   <artifactId>joni</artifactId>
   <packaging>jar</packaging>
-  <version>2.1.24-SNAPSHOT</version>
+  <version>2.1.25-SNAPSHOT</version>
   <name>Joni</name>
   <description>
     Java port of Oniguruma: http://www.geocities.jp/kosako3/oniguruma


=====================================
src/org/joni/Lexer.java
=====================================
@@ -422,8 +422,6 @@ class Lexer extends ScannerSupport {
     private final int fetchNameForNoNamedGroup(int startCode, boolean ref) {
         int src = p;
         value = 0;
-
-        int isNum = 0;
         int sign = 1;
 
         int endCode = nameEndCodePoint(startCode);
@@ -438,9 +436,7 @@ class Lexer extends ScannerSupport {
             if (c == endCode) newValueException(EMPTY_GROUP_NAME);
 
             if (enc.isDigit(c)) {
-                isNum = 1;
             } else if (c == '-') {
-                isNum = 2;
                 sign = -1;
                 pnumHead = p;
             } else {


=====================================
src/org/joni/Regex.java
=====================================
@@ -350,11 +350,12 @@ public final class Regex {
 
         if (e.ignoreCase > 0) {
             if (e.length >= 3 || (e.length >= 2 && allowReverse)) {
-                if (!setupBMSkipMap(true)) {
-                    forward = allowReverse ? Search.BM_IC_FORWARD : Search.BM_NOT_REV_IC_FORWARD;
-                } else {
-                    forward = enc.toLowerCaseTable() != null ? Search.SLOW_IC_SB_FORWARD : Search.SLOW_IC_FORWARD;
-                }
+                forward = enc.toLowerCaseTable() != null ? Search.SLOW_IC_SB_FORWARD : Search.SLOW_IC_FORWARD;
+//                if (!setupBMSkipMap(true)) {
+//                    forward = allowReverse ? Search.BM_IC_FORWARD : Search.BM_NOT_REV_IC_FORWARD;
+//                } else {
+//                    forward = enc.toLowerCaseTable() != null ? Search.SLOW_IC_SB_FORWARD : Search.SLOW_IC_FORWARD;
+//                }
             } else {
                 forward = enc.toLowerCaseTable() != null ? Search.SLOW_IC_SB_FORWARD : Search.SLOW_IC_FORWARD;
             }


=====================================
test/org/joni/test/TestError.java
=====================================
@@ -93,5 +93,7 @@ public class TestError extends Test {
 
 	    xerrs("(a)?(?<n>b)?(?(1)a)(?(<n>)b)", ErrorMessages.NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED);
 
+	    xerrs("()(?(2))", ErrorMessages.INVALID_BACKREF);
+	    xerrs("(?(700000))", ErrorMessages.INVALID_BACKREF);
     }
 }


=====================================
test/org/joni/test/TestU8.java
=====================================
@@ -346,5 +346,8 @@ public class TestU8 extends Test {
         x2s("^.+$", "a\n", 0, 1);
         x2s("^.+$", "\na\n", 1, 2);
         ns("^.+$", "\n");
+
+        ns("💌", "aa");
+        ns("aa", "💌");
     }
 }



View it on GitLab: https://salsa.debian.org/java-team/jruby-joni/compare/d3beb97fccd26ef9f8a5a0015b5da1de25a5e3ab...e9c75c0ffca7bf33545294f364b8c3b72613aa41

-- 
View it on GitLab: https://salsa.debian.org/java-team/jruby-joni/compare/d3beb97fccd26ef9f8a5a0015b5da1de25a5e3ab...e9c75c0ffca7bf33545294f364b8c3b72613aa41
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20181008/a8286e68/attachment.html>


More information about the pkg-java-commits mailing list