rjb 1.1.6-x86-mswin32-60 → 1.2.0-x86-mswin32-60
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +39 -0
- data/ext/jniwrap.h +1 -1
- data/ext/load.c +84 -36
- data/ext/rjb.c +4 -6
- data/ext/rjb.h +1 -1
- data/ext/rjbexception.c +2 -2
- data/lib/rjbcore.so +0 -0
- data/test/jp/co/infoseek/hp/arton/rjb/Base.class +0 -0
- data/test/jp/co/infoseek/hp/arton/rjb/ExtBase.class +0 -0
- data/test/jp/co/infoseek/hp/arton/rjb/IBase.class +0 -0
- data/test/jp/co/infoseek/hp/arton/rjb/Test$TestTypes.class +0 -0
- data/test/jp/co/infoseek/hp/arton/rjb/Test.class +0 -0
- data/test/test.rb +59 -35
- metadata +17 -13
data/ChangeLog
CHANGED
@@ -1,3 +1,42 @@
|
|
1
|
+
Sun Nov 1 arton
|
2
|
+
*ext/load.c
|
3
|
+
load jvm pointed by JVM_LIB environment variable first (suggested by Ittay Dror).
|
4
|
+
*ext/rjb.c
|
5
|
+
RJB_VERSION -> 1.2.0
|
6
|
+
Sun Oct 11 arton
|
7
|
+
*ext/extconf.rb
|
8
|
+
add double quotation around include path for mingw compiler, original patched by Roger Pack (thanks)
|
9
|
+
remove double quotaion around java_home variable for existing checking by File.directoy?
|
10
|
+
*rjb.rake
|
11
|
+
adding mingw support for the older version compatibility checking
|
12
|
+
Thu Sep 10 arton
|
13
|
+
*ext/load.c
|
14
|
+
Correct previous code (always reload jvm if OSX < Snow Leopard)
|
15
|
+
Clear DL's exception if success
|
16
|
+
*ext/rjb.c
|
17
|
+
RJB_VERSION -> 1.1.9
|
18
|
+
*ext/rjbexception.c
|
19
|
+
fit arguments for rb_raise to shut warning down
|
20
|
+
Mon Sep 07 arton
|
21
|
+
*ext/load.c
|
22
|
+
Check no compat type dylib after loading was failed (for Snow Leopard)
|
23
|
+
*ext/rjb.c
|
24
|
+
RJB_VERSION -> 1.1.8
|
25
|
+
Sun Feb 15 arton
|
26
|
+
*test/test/rb
|
27
|
+
add $KCODE and magic comment for iconv
|
28
|
+
*ext/rjb.c
|
29
|
+
RJB_VERSION -> 1.1.7
|
30
|
+
Thu Feb 5 kuwa1
|
31
|
+
*test/Test.java
|
32
|
+
*test/test.rb
|
33
|
+
add tests(Umlaut)
|
34
|
+
*ext/rjb.c
|
35
|
+
*ext/load.c
|
36
|
+
fix for ruby19
|
37
|
+
Sun Nov 16 arton
|
38
|
+
*ext/load.c
|
39
|
+
apply hpux patch, contributed by Ittay Dror. thanks
|
1
40
|
Tue Aug 26 arton
|
2
41
|
*ext/load.c, rjb.c, rjb.h
|
3
42
|
export safe_funcall under the prefix 'rjb'.
|
data/ext/jniwrap.h
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
13
|
* Lesser General Public License for more details.
|
14
14
|
*
|
15
|
-
* $Id: jniwrap.h
|
15
|
+
* $Id: jniwrap.h 4 2006-09-11 15:21:38Z arton $
|
16
16
|
*/
|
17
17
|
#ifndef _Included_jniwrap
|
18
18
|
#define _Included_jniwrap
|
data/ext/load.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* Rjb - Ruby <-> Java Bridge
|
3
|
-
* Copyright(c) 2004,2005,2006 arton
|
3
|
+
* Copyright(c) 2004,2005,2006,2009 arton
|
4
4
|
*
|
5
5
|
* This library is free software; you can redistribute it and/or
|
6
6
|
* modify it under the terms of the GNU Lesser General Public
|
@@ -12,7 +12,7 @@
|
|
12
12
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
13
|
* Lesser General Public License for more details.
|
14
14
|
*
|
15
|
-
* $Id: load.c
|
15
|
+
* $Id: load.c 102 2009-11-01 14:01:41Z arton $
|
16
16
|
*/
|
17
17
|
|
18
18
|
#include <stdlib.h>
|
@@ -45,7 +45,7 @@
|
|
45
45
|
#endif
|
46
46
|
#define CLASSPATH_SEP ';'
|
47
47
|
#elif defined(__APPLE__) && defined(__MACH__)
|
48
|
-
|
48
|
+
static char* JVMDLL = "%s/Libraries/libjvm_compat.dylib";
|
49
49
|
#define DIRSEPARATOR '/'
|
50
50
|
#define CLASSPATH_SEP ':'
|
51
51
|
#define HOME_NAME "/Home"
|
@@ -53,7 +53,15 @@
|
|
53
53
|
#define DEFAULT_HOME "/System/Library/Frameworks/JavaVM.framework"
|
54
54
|
#elif defined(_AIX)
|
55
55
|
#define ARCH "ppc"
|
56
|
+
#undef JVM_TYPE
|
56
57
|
#define JVM_TYPE "j9vm"
|
58
|
+
#elif defined(__hpux)
|
59
|
+
#define JVMDLL "%s/jre/lib/%s/%s/libjvm.sl"
|
60
|
+
#define ARCH "PA_RISC"
|
61
|
+
#undef JVM_TYPE
|
62
|
+
#define JVM_TYPE "server"
|
63
|
+
#define DIRSEPARATOR '/'
|
64
|
+
#define CLASSPATH_SEP ':'
|
57
65
|
#else /* defined(_WIN32) || defined(__CYGWIN__) */
|
58
66
|
#if defined(__sparc_v9__)
|
59
67
|
#define ARCH "sparcv9"
|
@@ -74,6 +82,14 @@
|
|
74
82
|
#define CLASSPATH_SEP ':'
|
75
83
|
#endif
|
76
84
|
|
85
|
+
#if defined(__APPLE__) && defined(__MACH__)
|
86
|
+
static char* CREATEJVM = "JNI_CreateJavaVM";
|
87
|
+
static char* GETDEFAULTJVMINITARGS = "JNI_GetDefaultJavaVMInitArgs";
|
88
|
+
#else
|
89
|
+
#define CREATEJVM "JNI_CreateJavaVM"
|
90
|
+
#define GETDEFAULTJVMINITARGS "JNI_GetDefaultJavaVMInitArgs"
|
91
|
+
#endif
|
92
|
+
|
77
93
|
typedef int (*GETDEFAULTJAVAVMINITARGS)(void*);
|
78
94
|
typedef int (*CREATEJAVAVM)(JavaVM**, JNIEnv**, void*);
|
79
95
|
|
@@ -82,6 +98,37 @@ static VALUE jvmdll = Qnil;
|
|
82
98
|
static VALUE getdefaultjavavminitargsfunc;
|
83
99
|
static VALUE createjavavmfunc;
|
84
100
|
|
101
|
+
static int open_jvm(char* libpath)
|
102
|
+
{
|
103
|
+
int sstat;
|
104
|
+
VALUE* argv;
|
105
|
+
|
106
|
+
rb_require("dl");
|
107
|
+
if (!rb_const_defined_at(rb_cObject, rb_intern("DL")))
|
108
|
+
{
|
109
|
+
rb_raise(rb_eRuntimeError, "Constants DL is not defined.");
|
110
|
+
return 0;
|
111
|
+
}
|
112
|
+
argv = ALLOCA_N(VALUE, 4);
|
113
|
+
*argv = rb_const_get(rb_cObject, rb_intern("DL"));
|
114
|
+
*(argv + 1) = rb_intern("dlopen");
|
115
|
+
*(argv + 2) = 1;
|
116
|
+
*(argv + 3) = rb_str_new2(libpath);
|
117
|
+
jvmdll = rb_protect(rjb_safe_funcall, (VALUE)argv, &sstat);
|
118
|
+
if (sstat)
|
119
|
+
{
|
120
|
+
return 0;
|
121
|
+
}
|
122
|
+
/* get function pointers of JNI */
|
123
|
+
#if RJB_RUBY_VERSION_CODE < 190
|
124
|
+
getdefaultjavavminitargsfunc = rb_funcall(rb_funcall(rb_funcall(jvmdll, rb_intern("[]"), 2, rb_str_new2(GETDEFAULTJVMINITARGS), rb_str_new2("IP")), rb_intern("to_ptr"), 0), rb_intern("to_i"), 0);
|
125
|
+
createjavavmfunc = rb_funcall(rb_funcall(rb_funcall(jvmdll, rb_intern("[]"), 2, rb_str_new2(CREATEJVM), rb_str_new2("IPPP")), rb_intern("to_ptr"), 0), rb_intern("to_i"), 0);
|
126
|
+
#else
|
127
|
+
getdefaultjavavminitargsfunc = rb_funcall(jvmdll, rb_intern("[]"), 1, rb_str_new2(GETDEFAULTJVMINITARGS));
|
128
|
+
createjavavmfunc = rb_funcall(jvmdll, rb_intern("[]"), 1, rb_str_new2(CREATEJVM));
|
129
|
+
#endif
|
130
|
+
return 1;
|
131
|
+
}
|
85
132
|
/*
|
86
133
|
* not completed, only valid under some circumstances.
|
87
134
|
*/
|
@@ -90,8 +137,6 @@ static int load_jvm(char* jvmtype)
|
|
90
137
|
char* libpath;
|
91
138
|
char* java_home;
|
92
139
|
char* jh;
|
93
|
-
int sstat;
|
94
|
-
VALUE* argv;
|
95
140
|
|
96
141
|
jh = getenv("JAVA_HOME");
|
97
142
|
#if defined(__APPLE__) && defined(__MACH__)
|
@@ -145,32 +190,7 @@ static int load_jvm(char* jvmtype)
|
|
145
190
|
+ strlen(ARCH) + strlen(jvmtype) + 1);
|
146
191
|
sprintf(libpath, JVMDLL, java_home, ARCH, jvmtype);
|
147
192
|
#endif
|
148
|
-
|
149
|
-
rb_require("dl");
|
150
|
-
if (!rb_const_defined_at(rb_cObject, rb_intern("DL")))
|
151
|
-
{
|
152
|
-
rb_raise(rb_eRuntimeError, "Constants DL is not defined.");
|
153
|
-
return 0;
|
154
|
-
}
|
155
|
-
argv = ALLOCA_N(VALUE, 4);
|
156
|
-
*argv = rb_const_get(rb_cObject, rb_intern("DL"));
|
157
|
-
*(argv + 1) = rb_intern("dlopen");
|
158
|
-
*(argv + 2) = 1;
|
159
|
-
*(argv + 3) = rb_str_new2(libpath);
|
160
|
-
jvmdll = rb_protect(rjb_safe_funcall, (VALUE)argv, &sstat);
|
161
|
-
if (sstat)
|
162
|
-
{
|
163
|
-
return 0;
|
164
|
-
}
|
165
|
-
/* get function pointers of JNI */
|
166
|
-
#if RJB_RUBY_VERSION_CODE < 190
|
167
|
-
getdefaultjavavminitargsfunc = rb_funcall(rb_funcall(rb_funcall(jvmdll, rb_intern("[]"), 2, rb_str_new2("JNI_GetDefaultJavaVMInitArgs"), rb_str_new2("IP")), rb_intern("to_ptr"), 0), rb_intern("to_i"), 0);
|
168
|
-
createjavavmfunc = rb_funcall(rb_funcall(rb_funcall(jvmdll, rb_intern("[]"), 2, rb_str_new2("JNI_CreateJavaVM"), rb_str_new2("IPPP")), rb_intern("to_ptr"), 0), rb_intern("to_i"), 0);
|
169
|
-
#else
|
170
|
-
getdefaultjavavminitargsfunc = rb_funcall(jvmdll, rb_intern("[]"), 1, rb_str_new2("JNI_GetDefaultJavaVMInitArgs"));
|
171
|
-
createjavavmfunc = rb_funcall(jvmdll, rb_intern("[]"), 1, rb_str_new2("JNI_CreateJavaVM"));
|
172
|
-
#endif
|
173
|
-
return 1;
|
193
|
+
return open_jvm(libpath);
|
174
194
|
}
|
175
195
|
|
176
196
|
static int load_bridge(JNIEnv* jenv)
|
@@ -248,10 +268,38 @@ int rjb_create_jvm(JNIEnv** pjenv, JavaVMInitArgs* vm_args, char* userpath, VALU
|
|
248
268
|
|
249
269
|
if (!RTEST(jvmdll))
|
250
270
|
{
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
271
|
+
char* libjvm = getenv("JVM_LIB");
|
272
|
+
#if defined(_WIN32)
|
273
|
+
if (libjvm && *libjvm == '"' && *(libjvm + strlen(libjvm) - 1) == '"')
|
274
|
+
{
|
275
|
+
char* p = ALLOCA_N(char, strlen(libjvm) + 1);
|
276
|
+
strcpy(p, libjvm + 1);
|
277
|
+
*(p + strlen(p) - 1) = '\0';
|
278
|
+
libjvm = p;
|
279
|
+
}
|
280
|
+
#endif
|
281
|
+
if (libjvm == NULL || !open_jvm(libjvm))
|
282
|
+
{
|
283
|
+
#if defined(__APPLE__) && defined(__MACH__)
|
284
|
+
if (!(load_jvm(JVM_TYPE) || load_jvm(ALT_JVM_TYPE)))
|
285
|
+
{
|
286
|
+
JVMDLL = "%s/Libraries/libjvm.dylib";
|
287
|
+
CREATEJVM = "JNI_CreateJavaVM_Impl";
|
288
|
+
GETDEFAULTJVMINITARGS = "JNI_GetDefaultJavaVMInitArgs_Impl";
|
289
|
+
#endif
|
290
|
+
if (!(load_jvm(JVM_TYPE) || load_jvm(ALT_JVM_TYPE)))
|
291
|
+
{
|
292
|
+
return -1;
|
293
|
+
}
|
294
|
+
#if defined(__APPLE__) && defined(__MACH__)
|
295
|
+
}
|
296
|
+
#endif
|
297
|
+
}
|
298
|
+
#if RJB_RUBY_VERSION_CODE < 190
|
299
|
+
ruby_errinfo = Qnil;
|
300
|
+
#else
|
301
|
+
rb_set_errinfo(Qnil);
|
302
|
+
#endif
|
255
303
|
}
|
256
304
|
|
257
305
|
if (NIL_P(getdefaultjavavminitargsfunc))
|
@@ -282,7 +330,7 @@ int rjb_create_jvm(JNIEnv** pjenv, JavaVMInitArgs* vm_args, char* userpath, VALU
|
|
282
330
|
optlen = 0;
|
283
331
|
if (!NIL_P(argv))
|
284
332
|
{
|
285
|
-
optlen +=
|
333
|
+
optlen += RARRAY_LEN(argv);
|
286
334
|
}
|
287
335
|
optlen += COUNTOF(soptions);
|
288
336
|
options = ALLOCA_N(JavaVMOption, optlen);
|
data/ext/rjb.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* Rjb - Ruby <-> Java Bridge
|
3
|
-
* Copyright(c) 2004,2005,2006,2007,2008 arton
|
3
|
+
* Copyright(c) 2004,2005,2006,2007,2008,2009 arton
|
4
4
|
*
|
5
5
|
* This library is free software; you can redistribute it and/or
|
6
6
|
* modify it under the terms of the GNU Lesser General Public
|
@@ -12,10 +12,10 @@
|
|
12
12
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
13
|
* Lesser General Public License for more details.
|
14
14
|
*
|
15
|
-
* $Id: rjb.c
|
15
|
+
* $Id: rjb.c 102 2009-11-01 14:01:41Z arton $
|
16
16
|
*/
|
17
17
|
|
18
|
-
#define RJB_VERSION "1.
|
18
|
+
#define RJB_VERSION "1.2.0"
|
19
19
|
|
20
20
|
#include "ruby.h"
|
21
21
|
#include "extconf.h"
|
@@ -447,11 +447,9 @@ static VALUE call_conv(JNIEnv* jenv, jvalue val, size_t sz, void* p, CONV conv,
|
|
447
447
|
char* cp = (char*)p;
|
448
448
|
jsize len = (*jenv)->GetArrayLength(jenv, val.l);
|
449
449
|
VALUE v = rb_ary_new2(len);
|
450
|
-
VALUE* pv = RARRAY_PTR(v);
|
451
|
-
RARRAY_LEN(v) = len;
|
452
450
|
for (i = 0; i < len; i++)
|
453
451
|
{
|
454
|
-
|
452
|
+
rb_ary_push(v, conv(jenv, cp));
|
455
453
|
cp += sz;
|
456
454
|
}
|
457
455
|
(*(RELEASEARRAY*)(((char*)*jenv) + fnc))(jenv, val.l, p, JNI_ABORT);
|
data/ext/rjb.h
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
13
|
* Lesser General Public License for more details.
|
14
14
|
*
|
15
|
-
* $Id: rjb.h
|
15
|
+
* $Id: rjb.h 81 2008-08-26 12:44:44Z arton $
|
16
16
|
* $Log: rjb.h,v $
|
17
17
|
* Revision 1.1 2005/01/16 17:36:10 arton
|
18
18
|
* Initial revision
|
data/ext/rjbexception.c
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
13
|
* Lesser General Public License for more details.
|
14
14
|
*
|
15
|
-
* $Id: rjbexception.c
|
15
|
+
* $Id: rjbexception.c 94 2009-09-10 13:54:42Z arton $
|
16
16
|
*/
|
17
17
|
|
18
18
|
#include "ruby.h"
|
@@ -132,7 +132,7 @@ void rjb_check_exception(JNIEnv* jenv, int t)
|
|
132
132
|
}
|
133
133
|
else
|
134
134
|
{
|
135
|
-
|
135
|
+
rb_raise(rexp, "%s", msg);
|
136
136
|
}
|
137
137
|
}
|
138
138
|
}
|
data/lib/rjbcore.so
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/test/test.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
#!/usr/local/env ruby
|
2
|
-
#
|
1
|
+
#!/usr/local/env ruby -Ku
|
2
|
+
# encoding: utf-8
|
3
|
+
# $Id: test.rb 87 2009-02-15 12:25:36Z arton $
|
3
4
|
|
4
5
|
begin
|
5
6
|
require 'rjb'
|
@@ -167,40 +168,63 @@ class TestRjb < Test::Unit::TestCase
|
|
167
168
|
assert_equal(@jString.new("abcdef".force_encoding(Encoding::ASCII_8BIT)).toString(), "abcdef")
|
168
169
|
assert_equal(@jString.new("abcdef".force_encoding(Encoding::find("us-ascii"))).toString(), "abcdef")
|
169
170
|
else
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
171
|
+
default_kcode = $KCODE
|
172
|
+
begin
|
173
|
+
$KCODE = 'euc'
|
174
|
+
euc_kj = "\xb4\xc1\xbb\xfa\xa5\xc6\xa5\xad\xa5\xb9\xa5\xc8"
|
175
|
+
s = @jString.new(euc_kj)
|
176
|
+
assert_equal(s.toString(), euc_kj)
|
177
|
+
$KCODE = 'sjis'
|
178
|
+
sjis_kj = "\x8a\xbf\x8e\x9a\x83\x65\x83\x4c\x83\x58\x83\x67"
|
179
|
+
s = @jString.new(sjis_kj)
|
180
|
+
assert_equal(s.toString(), sjis_kj)
|
181
|
+
$KCODE = 'utf8'
|
182
|
+
utf8_kj = "\xE6\xBC\xA2\xE5\xAD\x97\xE3\x83\x86\xE3\x82\xAD\xE3\x82\xB9\xE3\x83\x88"
|
183
|
+
s = @jString.new(utf8_kj)
|
184
|
+
assert_equal(s.toString(), utf8_kj)
|
185
|
+
$KCODE = 'none'
|
186
|
+
if /mswin(?!ce)|mingw|cygwin|bccwin/ =~ RUBY_PLATFORM
|
187
|
+
#expecting shift_jis on windows
|
188
|
+
none_kj = "\x8a\xbf\x8e\x9a\x83\x65\x83\x4c\x83\x58\x83\x67"
|
189
|
+
else
|
190
|
+
#expecting utf-8 unless windows
|
191
|
+
none_kj = "\xE6\xBC\xA2\xE5\xAD\x97\xE3\x83\x86\xE3\x82\xAD\xE3\x82\xB9\xE3\x83\x88"
|
192
|
+
end
|
193
|
+
s = @jString.new(none_kj)
|
194
|
+
assert_equal(s.toString(), none_kj)
|
195
|
+
$KCODE = 'utf8'
|
196
|
+
utf8_kj = "\xE6\xBC\xA2\xE5\xAD\x97\xE3\x83\x86\xE3\x82\xAD\xE3\x82\xB9\xE3\x83\x88"
|
197
|
+
s = @jString.new(utf8_kj)
|
198
|
+
assert_equal(s.toString(), utf8_kj)
|
199
|
+
$KCODE = 'sjis'
|
200
|
+
sjis_kj = "\x8a\xbf\x8e\x9a\x83\x65\x83\x4c\x83\x58\x83\x67"
|
201
|
+
s = @jString.new(sjis_kj)
|
202
|
+
assert_equal(s.toString(), sjis_kj)
|
203
|
+
$KCODE = 'euc'
|
204
|
+
euc_kj = "\xb4\xc1\xbb\xfa\xa5\xc6\xa5\xad\xa5\xb9\xa5\xc8"
|
205
|
+
s = @jString.new(euc_kj)
|
206
|
+
assert_equal(s.toString(), euc_kj)
|
207
|
+
ensure
|
208
|
+
$KCODE = default_kcode
|
209
|
+
end
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
def test_combination_charcters
|
214
|
+
teststr = "\xc7\x96\xc3\xbc\xcc\x84\x75\xcc\x88\xcc\x84\xed\xa1\xa9\xed\xba\xb2\xe3\x81\x8b\xe3\x82\x9a"
|
215
|
+
test = import('jp.co.infoseek.hp.arton.rjb.Test').new
|
216
|
+
s = test.getUmlaut()
|
217
|
+
if Object::const_defined?(:Encoding) #>=1.9
|
218
|
+
teststr = teststr.force_encoding(Encoding::UTF_8)
|
219
|
+
assert_equal(s, teststr)
|
220
|
+
else
|
221
|
+
default_kcode = $KCODE
|
222
|
+
begin
|
223
|
+
$KCODE = "utf8"
|
224
|
+
assert_equal(s, teststr)
|
225
|
+
ensure
|
226
|
+
$KCODE = default_kcode
|
189
227
|
end
|
190
|
-
s = @jString.new(none_kj)
|
191
|
-
assert_equal(s.toString(), none_kj)
|
192
|
-
$KCODE = 'utf8'
|
193
|
-
utf8_kj = "\xE6\xBC\xA2\xE5\xAD\x97\xE3\x83\x86\xE3\x82\xAD\xE3\x82\xB9\xE3\x83\x88"
|
194
|
-
s = @jString.new(utf8_kj)
|
195
|
-
assert_equal(s.toString(), utf8_kj)
|
196
|
-
$KCODE = 'sjis'
|
197
|
-
sjis_kj = "\x8a\xbf\x8e\x9a\x83\x65\x83\x4c\x83\x58\x83\x67"
|
198
|
-
s = @jString.new(sjis_kj)
|
199
|
-
assert_equal(s.toString(), sjis_kj)
|
200
|
-
$KCODE = 'euc'
|
201
|
-
euc_kj = "\xb4\xc1\xbb\xfa\xa5\xc6\xa5\xad\xa5\xb9\xa5\xc8"
|
202
|
-
s = @jString.new(euc_kj)
|
203
|
-
assert_equal(s.toString(), euc_kj)
|
204
228
|
end
|
205
229
|
end
|
206
230
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rjb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: x86-mswin32-60
|
6
6
|
authors:
|
7
7
|
- arton
|
@@ -9,11 +9,13 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2009-11-01 00:00:00 +09:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
16
|
-
description:
|
16
|
+
description: |
|
17
|
+
RJB is a bridge program that connect between Ruby and Java with Java Native Interface.
|
18
|
+
|
17
19
|
email: artonx@gmail.com
|
18
20
|
executables: []
|
19
21
|
|
@@ -24,32 +26,34 @@ extra_rdoc_files: []
|
|
24
26
|
files:
|
25
27
|
- ext/RBridge.java
|
26
28
|
- ext/load.c
|
27
|
-
- ext/riconv.c
|
28
29
|
- ext/rjbexception.c
|
30
|
+
- ext/riconv.c
|
29
31
|
- ext/rjb.c
|
30
|
-
- ext/jniwrap.h
|
31
|
-
- ext/rjb.h
|
32
|
-
- ext/riconv.h
|
33
32
|
- ext/jp_co_infoseek_hp_arton_rjb_RBridge.h
|
33
|
+
- ext/riconv.h
|
34
34
|
- ext/extconf.h
|
35
|
+
- ext/jniwrap.h
|
36
|
+
- ext/rjb.h
|
35
37
|
- ext/depend
|
36
38
|
- data/rjb/jp/co/infoseek/hp/arton/rjb/RBridge.class
|
37
39
|
- lib/rjb.rb
|
38
40
|
- samples/filechooser.rb
|
39
41
|
- test/test.rb
|
40
42
|
- test/gctest.rb
|
41
|
-
- test/jp/co/infoseek/hp/arton/rjb/
|
42
|
-
- test/jp/co/infoseek/hp/arton/rjb/Test.class
|
43
|
+
- test/jp/co/infoseek/hp/arton/rjb/Base.class
|
43
44
|
- test/jp/co/infoseek/hp/arton/rjb/IBase.class
|
45
|
+
- test/jp/co/infoseek/hp/arton/rjb/Test.class
|
44
46
|
- test/jp/co/infoseek/hp/arton/rjb/Test$TestTypes.class
|
45
|
-
- test/jp/co/infoseek/hp/arton/rjb/
|
47
|
+
- test/jp/co/infoseek/hp/arton/rjb/ExtBase.class
|
46
48
|
- COPYING
|
47
49
|
- ChangeLog
|
48
50
|
- readme.sj
|
49
51
|
- readme.txt
|
50
52
|
- lib/rjbcore.so
|
51
|
-
has_rdoc:
|
53
|
+
has_rdoc: true
|
52
54
|
homepage: http://rjb.rubyforge.org/
|
55
|
+
licenses: []
|
56
|
+
|
53
57
|
post_install_message:
|
54
58
|
rdoc_options: []
|
55
59
|
|
@@ -72,9 +76,9 @@ requirements:
|
|
72
76
|
- JDK 5.0
|
73
77
|
- " VC6 version of Ruby"
|
74
78
|
rubyforge_project:
|
75
|
-
rubygems_version: 1.
|
79
|
+
rubygems_version: 1.3.4
|
76
80
|
signing_key:
|
77
|
-
specification_version:
|
81
|
+
specification_version: 3
|
78
82
|
summary: Ruby Java bridge
|
79
83
|
test_files:
|
80
84
|
- test/test.rb
|