Skip to content
Commits on Source (6)
......@@ -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
......
......@@ -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 {
......
......@@ -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;
}
......
......@@ -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);
}
}
......@@ -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", "💌");
}
}