rjb 1.6.8 → 1.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog +7 -0
- data/ext/extconf.h +1 -1
- data/ext/riconv.c +6 -4
- data/ext/rjb.c +1 -1
- data/test/test.rb +11 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db68bd4fe5b0ad8ab33ded261ddfbddac69c2f1713b3be5ccec7c19bf6d504ef
|
4
|
+
data.tar.gz: 05cfef71f471a7e181964971cc9efdbf14a6be594957c8f7f2cc79d66abcb634
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d03e67bbe85d5d21ad9368d9956d48e802d2948260f9df551ebf9c3ea5c98753400dfe0446bd0a6fa5711e1f23ce2ed3144e2529c88a6507d8d5ca01fbb91d79
|
7
|
+
data.tar.gz: 1811c379afd0cfae646b3fd055399d706e3ee94270c9585f34b0ddbe4c7225694480fce0b390e9762e54292c1d6e8d9073a7deb71e6561b3923b46f79585109b
|
data/ChangeLog
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
Thu Nov 9 2023 arton
|
2
|
+
* ext/rjb.c
|
3
|
+
RJB_VERSION -> 1.6.9
|
4
|
+
* ext/riconv.c
|
5
|
+
fix CESU-8 check
|
6
|
+
* test/est.rb
|
7
|
+
add test_jav_hangul_syllable for checking CESU-8 bug (char start with 0xed)
|
1
8
|
Thu Sep 28 2023 chaddow
|
2
9
|
#93 fake allocation framework to remove T_DATA warning
|
3
10
|
* ext/rjb.c
|
data/ext/extconf.h
CHANGED
data/ext/riconv.c
CHANGED
@@ -14,7 +14,6 @@
|
|
14
14
|
*
|
15
15
|
* $Id: riconv.c 117 2010-06-04 12:16:25Z arton $
|
16
16
|
*/
|
17
|
-
|
18
17
|
#include "ruby.h"
|
19
18
|
#include "extconf.h"
|
20
19
|
|
@@ -196,12 +195,15 @@ static int contains_auxchar(const unsigned char* p)
|
|
196
195
|
{
|
197
196
|
while (*p)
|
198
197
|
{
|
199
|
-
|
198
|
+
if (*p == 0xed && *(p + 1) && *(p + 1))
|
200
199
|
{
|
201
200
|
#if defined(DEBUG)
|
202
|
-
|
201
|
+
printf("find %02x %02x %02x %02x %02x %02x\n", *p, *(p + 1), *(p + 2), *(p + 3), *(p + 4), *(p + 5));
|
203
202
|
#endif
|
204
|
-
|
203
|
+
if ((*(p + 1) & 0xa0) == 0xa0 && (*(p + 2) & 0xb0) == 0xb0)
|
204
|
+
{
|
205
|
+
return 1;
|
206
|
+
}
|
205
207
|
}
|
206
208
|
switch (*p & 0xe0)
|
207
209
|
{
|
data/ext/rjb.c
CHANGED
data/test/test.rb
CHANGED
@@ -960,10 +960,20 @@ class TestRjb < Test::Unit::TestCase
|
|
960
960
|
end
|
961
961
|
|
962
962
|
def test_java_utf8
|
963
|
-
y = @jString.new('𠮷野家')
|
963
|
+
y = @jString.new('𠮷野家') # with surrogate pair
|
964
964
|
assert_equal '𠮷野家', y.toString
|
965
965
|
end
|
966
966
|
|
967
|
+
def test_java_hangul_syllable
|
968
|
+
# 토 \uD1A => ED 86 A0 (utf-8)
|
969
|
+
test_string = "토" # simple unicode char (not surrogate pair)
|
970
|
+
y = @jString.new_with_sig('Ljava.lang.String;', test_string)
|
971
|
+
assert_equal(test_string, y.toString)
|
972
|
+
test_string = "토토" # simple unicode char (not surrogate pair)
|
973
|
+
y = @jString.new_with_sig('Ljava.lang.String;', test_string)
|
974
|
+
assert_equal(test_string, y.toString)
|
975
|
+
end
|
976
|
+
|
967
977
|
def test_respond_to
|
968
978
|
str = @jString.new('blabla')
|
969
979
|
assert str.respond_to? :substring
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rjb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- arton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09
|
11
|
+
date: 2023-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: 'RJB is a bridge program that connect between Ruby and Java with Java
|
14
14
|
Native Interface.
|