rjb 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +4 -0
- data/ext/rjb.c +8 -8
- data/test/test.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8d2fe4f37eb369c29fc25f688dbf8623142a59d
|
4
|
+
data.tar.gz: 0cbd8d8975cbd3292ea1b02e287950412f14bf8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0064fb940021e09cd18a5154096eb9abb64ec191b30f1aefccacf57b72a2dd2d8a1d211e99f841235c8bf63173b11fa4f11b2511bb2497f8f0ba5ac7dd543d68
|
7
|
+
data.tar.gz: 6dfc1a8cbc9d11bc9e310186fb5340f3e2b68bcceccd7bf7b1c84a36abdcdd4904f5548fff298acf9e689593b9dcb15b614de50ea3393cd05b07cc5930551405
|
data/ChangeLog
CHANGED
data/ext/rjb.c
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
* $Id: rjb.c 199 2012-12-17 13:31:18Z arton $
|
16
16
|
*/
|
17
17
|
|
18
|
-
#define RJB_VERSION "1.5.
|
18
|
+
#define RJB_VERSION "1.5.1"
|
19
19
|
|
20
20
|
#include "ruby.h"
|
21
21
|
#include "extconf.h"
|
@@ -2131,7 +2131,7 @@ static VALUE register_instance(JNIEnv* jenv, VALUE klass, struct jv_data* org, j
|
|
2131
2131
|
* temporary signature check
|
2132
2132
|
* return !0 if found
|
2133
2133
|
*/
|
2134
|
-
#define
|
2134
|
+
#define UNMATCHED 0
|
2135
2135
|
#define SATISFIED 1
|
2136
2136
|
#define SOSO 2
|
2137
2137
|
#define PREFERABLE 3
|
@@ -2162,7 +2162,7 @@ static int check_rtype(JNIEnv* jenv, VALUE* pv, char* p)
|
|
2162
2162
|
case T_FLOAT:
|
2163
2163
|
if (*p == 'D') return SOSO;
|
2164
2164
|
if (*p == 'F') return SATISFIED;
|
2165
|
-
return
|
2165
|
+
return UNMATCHED;
|
2166
2166
|
case T_STRING:
|
2167
2167
|
if (pcls && (!strcmp("java.lang.String", pcls)
|
2168
2168
|
|| !strcmp("java.lang.CharSequence", pcls)))
|
@@ -2173,12 +2173,12 @@ static int check_rtype(JNIEnv* jenv, VALUE* pv, char* p)
|
|
2173
2173
|
{
|
2174
2174
|
return SATISFIED;
|
2175
2175
|
}
|
2176
|
-
return
|
2176
|
+
return UNMATCHED;
|
2177
2177
|
case T_TRUE:
|
2178
2178
|
case T_FALSE:
|
2179
|
-
return *p == 'Z';
|
2179
|
+
return (*p == 'Z') ? SOSO : UNMATCHED;
|
2180
2180
|
case T_ARRAY:
|
2181
|
-
return *p == '[';
|
2181
|
+
return (*p == '[') ? SOSO : UNMATCHED;
|
2182
2182
|
case T_DATA:
|
2183
2183
|
if (IS_RJB_OBJECT(*pv) && pcls)
|
2184
2184
|
{
|
@@ -2194,7 +2194,7 @@ static int check_rtype(JNIEnv* jenv, VALUE* pv, char* p)
|
|
2194
2194
|
result = (cls && (*jenv)->IsInstanceOf(jenv, ptr->obj, cls));
|
2195
2195
|
(*jenv)->DeleteLocalRef(jenv, cls);
|
2196
2196
|
}
|
2197
|
-
return (result) ? PREFERABLE :
|
2197
|
+
return (result) ? PREFERABLE : UNMATCHED;
|
2198
2198
|
} else if (pcls) {
|
2199
2199
|
VALUE blockobj = rb_class_new_instance(1, pv, rjba);
|
2200
2200
|
*pv = rjb_s_bind(rjbb, blockobj, rb_str_new2(pcls));
|
@@ -2207,7 +2207,7 @@ static int check_rtype(JNIEnv* jenv, VALUE* pv, char* p)
|
|
2207
2207
|
{
|
2208
2208
|
return SATISFIED;
|
2209
2209
|
}
|
2210
|
-
return
|
2210
|
+
return UNMATCHED;
|
2211
2211
|
}
|
2212
2212
|
}
|
2213
2213
|
|
data/test/test.rb
CHANGED
@@ -907,7 +907,7 @@ class TestRjb < Test::Unit::TestCase
|
|
907
907
|
e = @jString.new("\xb4\xc1\xbb\xfa\xa5\xc6\xa5\xad\xa5\xb9\xa5\xc8".force_encoding Encoding::EUC_JP)
|
908
908
|
u = @jString.new("\xE6\xBC\xA2\xE5\xAD\x97\xE3\x83\x86\xE3\x82\xAD\xE3\x82\xB9\xE3\x83\x88".force_encoding Encoding::UTF_8)
|
909
909
|
if encoding == 'MS932'
|
910
|
-
s1 = @jString.
|
910
|
+
s1 = @jString.new_with_sig('[B', "\x8a\xbf\x8e\x9a\x83\x65\x83\x4c\x83\x58\x83\x67".bytes)
|
911
911
|
elsif encoding.upcase == 'EUC-JP'
|
912
912
|
s1 = @jString.new("\xb4\xc1\xbb\xfa\xa5\xc6\xa5\xad\xa5\xb9\xa5\xc8".bytes)
|
913
913
|
elsif encoding.upcase == 'UTF-8'
|
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.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- arton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
RJB is a bridge program that connect between Ruby and Java with Java Native Interface.
|