rjb 1.5.8 → 1.5.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +9 -0
- data/ext/{depend → depend.erb} +1 -1
- data/ext/extconf.h +1 -1
- data/ext/extconf.rb +10 -0
- data/ext/rjb.c +1 -1
- data/ext/rjbexception.c +10 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8eddc0f7bf9505a5f48e1098dd18f0133253986978599c40e5c39ce6cc48b90
|
4
|
+
data.tar.gz: 880d819371d1cb1c738c2db0c0395873d86391ecef8b056c7597aacf930598ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad9b557b9ff3d9091663df6041b63672ba96a2e192f23deba2dbe6dfe94edf09f36176e8894b2e71c8194f68e6f4e23b1e67c9a7064c52c5dea5ce0723be9e14
|
7
|
+
data.tar.gz: 7da7f62f72373a83ef662ee62cd37c7fdac28a52c6fc059af337970a7249103858442c304b139945118371c2893ac6057404f619016d4cff758a5aabaffd80f2
|
data/ChangeLog
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
Sun Feb 17 2019 lamby / arton
|
2
|
+
* ext/rjb.c
|
3
|
+
RJB_VERSION -> 1.5.9
|
4
|
+
* ext/depend.erb
|
5
|
+
it set javah line by ERB
|
6
|
+
* ext/extconf.rb
|
7
|
+
change javah to javac -h if it does not exist
|
8
|
+
* ext/depend
|
9
|
+
replaced by depend.erb
|
1
10
|
Thu Jan 17 2019 arton
|
2
11
|
* ext/rjbexception.c
|
3
12
|
restore method_missing for the exception class
|
data/ext/{depend → depend.erb}
RENAMED
@@ -3,7 +3,7 @@ rjb.o : rjb.c jp_co_infoseek_hp_arton_rjb_RBridge.h riconv.h rjb.h
|
|
3
3
|
rjbexception.o : rjbexception.c jp_co_infoseek_hp_arton_rjb_RBridge.h riconv.h rjb.h
|
4
4
|
load.o : load.c jp_co_infoseek_hp_arton_rjb_RBridge.h
|
5
5
|
jp_co_infoseek_hp_arton_rjb_RBridge.h : jniwrap.h ../data/rjb/jp/co/infoseek/hp/arton/rjb/RBridge.class
|
6
|
-
javah
|
6
|
+
<%= javah %>
|
7
7
|
../data/rjb/jp/co/infoseek/hp/arton/rjb/RBridge.class : RBridge.java
|
8
8
|
mkdir -p ../data/rjb/jp/co/infoseek/hp/arton/rjb
|
9
9
|
javac -d ../data/rjb RBridge.java
|
data/ext/extconf.h
CHANGED
data/ext/extconf.rb
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# $Date: $
|
5
5
|
#----------------------------------
|
6
6
|
require 'mkmf'
|
7
|
+
require 'erb'
|
7
8
|
|
8
9
|
class Path
|
9
10
|
|
@@ -74,4 +75,13 @@ when /mswin32/
|
|
74
75
|
when /cygwin/, /mingw/
|
75
76
|
$defs << '-DNONAMELESSUNION'
|
76
77
|
end
|
78
|
+
|
79
|
+
if find_executable('javah')
|
80
|
+
javah = 'javah -classpath ../data/rjb jp.co.infoseek.hp.arton.rjb.RBridge'
|
81
|
+
else
|
82
|
+
javah = 'javac -h . -classpath ../data/rjb RBridge.java'
|
83
|
+
end
|
84
|
+
File.open('depend', 'w') do |fout|
|
85
|
+
fout.write ERB.new(IO::read('depend.erb')).result
|
86
|
+
end
|
77
87
|
create_rjb_makefile
|
data/ext/rjb.c
CHANGED
data/ext/rjbexception.c
CHANGED
@@ -37,6 +37,15 @@ static VALUE get_cause(VALUE self)
|
|
37
37
|
return rb_funcall(rb_ivar_get(self, rb_intern("@cause")), rb_intern("cause"), 0);
|
38
38
|
}
|
39
39
|
|
40
|
+
static VALUE ex_respond_to(int argc, VALUE* argv, VALUE self)
|
41
|
+
{
|
42
|
+
if (argc < 1 || argc > 2)
|
43
|
+
{
|
44
|
+
rb_raise(rb_eArgError, "respond_to? require 1 or 2 arguments");
|
45
|
+
}
|
46
|
+
return rb_to_id(argv[0]) == rb_intern("to_str") ? Qfalse : Qtrue;
|
47
|
+
}
|
48
|
+
|
40
49
|
/*
|
41
50
|
* handle Java exception
|
42
51
|
* At this time, the Java exception is defined without the package name.
|
@@ -67,6 +76,7 @@ VALUE rjb_get_exception_class(JNIEnv* jenv, jstring str)
|
|
67
76
|
rexp = rb_define_class(pcls, rb_eStandardError);
|
68
77
|
rb_define_method(rexp, "cause", get_cause, 0);
|
69
78
|
rb_define_method(rexp, "method_missing", missing_delegate, -1);
|
79
|
+
rb_define_method(rexp, "respond_to?", ex_respond_to, -1);
|
70
80
|
#if defined(HAVE_RB_HASH_ASET) || defined(RUBINIUS)
|
71
81
|
rb_hash_aset(rjb_loaded_classes, cname, rexp);
|
72
82
|
#else
|
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.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- arton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-02-17 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.
|
@@ -24,7 +24,7 @@ files:
|
|
24
24
|
- ChangeLog
|
25
25
|
- data/rjb/jp/co/infoseek/hp/arton/rjb/RBridge.class
|
26
26
|
- ext/RBridge.java
|
27
|
-
- ext/depend
|
27
|
+
- ext/depend.erb
|
28
28
|
- ext/extconf.h
|
29
29
|
- ext/extconf.rb
|
30
30
|
- ext/jniwrap.h
|