Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (6)
back off Search.BM_IC and Search.BM_NOT_REV_IC until we find a solution for #25
· 118dbdee
Marcin Mielzynski
authored
Oct 03, 2018
118dbdee
[maven-release-plugin] prepare release joni-2.1.24
· 3856aadd
Marcin Mielzynski
authored
Oct 03, 2018
3856aadd
[maven-release-plugin] prepare for next development iteration
· 4a2da27c
Marcin Mielzynski
authored
Oct 03, 2018
4a2da27c
cover two more error exceptions
· fd9165ff
Marcin Mielzynski
authored
Oct 03, 2018
fd9165ff
reverse test
· c2c03e70
Marcin Mielzynski
authored
Oct 03, 2018
c2c03e70
remove unused var
· e9c75c0f
Marcin Mielzynski
authored
Oct 03, 2018
e9c75c0f
Hide whitespace changes
Inline
Side-by-side
pom.xml
View file @
e9c75c0f
...
...
@@ -4,7 +4,7 @@
<groupId>
org.jruby.joni
</groupId>
<artifactId>
joni
</artifactId>
<packaging>
jar
</packaging>
<version>
2.1.2
4
-SNAPSHOT
</version>
<version>
2.1.2
5
-SNAPSHOT
</version>
<name>
Joni
</name>
<description>
Java port of Oniguruma: http://www.geocities.jp/kosako3/oniguruma
...
...
src/org/joni/Lexer.java
View file @
e9c75c0f
...
...
@@ -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
View file @
e9c75c0f
...
...
@@ -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
View file @
e9c75c0f
...
...
@@ -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
View file @
e9c75c0f
...
...
@@ -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"
,
"💌"
);
}
}