rjb 1.6.7 → 1.6.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +8 -0
- data/ext/extconf.h +1 -1
- data/ext/rjb.c +8 -1
- data/readme.txt +2 -2
- metadata +4 -8
- data/test/anon-test-50.rb +0 -13
- data/test/anon.rb +0 -23
- data/test/b.rb +0 -13
- data/test/x.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c844ae35b7db5e279feb4088495040f16f520173a65c096b564a88a2816faba6
|
4
|
+
data.tar.gz: 842e428865248d83b1a49d61ffa5b654586ecb80cf566e78b9b6ff4c0a7a5dbf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 115259efb72d586e6cea9d2b12ccbd90c5b18bc531f60753b4348463f768d3721ff17af0f3a3979b5830e98c023a7d02818edc125b2a6779816440b8fc6bc297
|
7
|
+
data.tar.gz: 93e80bc33b9f8ea9f658a8566e9b4e72d03a01eca89f283323180ec4d146a625b5ca751e1c20fc93ffb8864d162a5370b2e0f2513a10f569729131bbbd60f4ac
|
data/ChangeLog
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
Thu Sep 28 2023 chaddow
|
2
|
+
#93 fake allocation framework to remove T_DATA warning
|
3
|
+
* ext/rjb.c
|
4
|
+
call rb_undef_alloc_fund if HAV_RB_DEFINE_ALLOC_FUNC
|
5
|
+
Wed Mar 1 2023 mahendrapk
|
6
|
+
Fix typo and broken URI
|
7
|
+
* README.md
|
8
|
+
* readme.txt
|
1
9
|
Wed Feb 15 2023 geekontheway
|
2
10
|
Fix aarch64 checking exception
|
3
11
|
* ext/load.c
|
data/ext/extconf.h
CHANGED
data/ext/rjb.c
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
*
|
15
15
|
*/
|
16
16
|
|
17
|
-
#define RJB_VERSION "1.6.
|
17
|
+
#define RJB_VERSION "1.6.8"
|
18
18
|
|
19
19
|
#include "ruby.h"
|
20
20
|
#include "extconf.h"
|
@@ -64,6 +64,10 @@
|
|
64
64
|
#define IS_RJB_OBJECT(v) (CLASS_INHERITED(rjbi, rb_obj_class(v)) || rb_obj_class(v) == rjb || CLASS_INHERITED(rjbb, rb_obj_class(v)))
|
65
65
|
#define USER_INITIALIZE "@user_initialize"
|
66
66
|
|
67
|
+
#if !defined(HAVE_RB_DEFINE_ALLOC_FUNC)
|
68
|
+
static void rb_undef_alloc_func(v) {}
|
69
|
+
#endif
|
70
|
+
|
67
71
|
static void register_class(VALUE, VALUE);
|
68
72
|
static VALUE import_class(JNIEnv* jenv, jclass, VALUE);
|
69
73
|
static VALUE register_instance(JNIEnv* jenv, VALUE klass, struct jv_data*, jobject);
|
@@ -2095,6 +2099,7 @@ static VALUE import_class(JNIEnv* jenv, jclass jcls, VALUE clsname)
|
|
2095
2099
|
}
|
2096
2100
|
}
|
2097
2101
|
rexp = rb_define_class_under(rjb, nm, rjbc);
|
2102
|
+
rb_undef_alloc_func(rexp);
|
2098
2103
|
ptr = ALLOC(struct jv_data);
|
2099
2104
|
memset(ptr, 0, sizeof(struct jv_data));
|
2100
2105
|
v = Data_Wrap_Struct(rexp, NULL, rjb_s_free, ptr);
|
@@ -3333,6 +3338,7 @@ void Init_rjbcore()
|
|
3333
3338
|
|
3334
3339
|
/* Java instance object */
|
3335
3340
|
rjbi = CLASS_NEW(rb_cObject, "Rjb_JavaProxy");
|
3341
|
+
rb_undef_alloc_func(rjbi);
|
3336
3342
|
rb_gc_register_address(&rjbi);
|
3337
3343
|
rb_define_method(rjbi, "method_missing", rjb_i_missing, -1);
|
3338
3344
|
rb_define_method(rjbi, "_invoke", rjb_i_invoke, -1);
|
@@ -3342,6 +3348,7 @@ void Init_rjbcore()
|
|
3342
3348
|
|
3343
3349
|
/* Ruby-Java Bridge object */
|
3344
3350
|
rjbb = CLASS_NEW(rb_cObject, "Rjb_JavaBridge");
|
3351
|
+
rb_undef_alloc_func(rjbb);
|
3345
3352
|
rb_gc_register_address(&rjbb);
|
3346
3353
|
|
3347
3354
|
/* anonymous interface object */
|
data/readme.txt
CHANGED
@@ -28,10 +28,10 @@ see test/readme.unix
|
|
28
28
|
you must set LD_LIBRARY_PATH environmental variable to run rjb.
|
29
29
|
|
30
30
|
-- Notice for opening non-ASCII 7bit filename
|
31
|
-
If you'll plan to open the non-ascii character named file by Java class through Rjb, it may require to set LC_ALL environment variable in
|
31
|
+
If you'll plan to open the non-ascii character named file by Java class through Rjb, it may require to set LC_ALL environment variable in your script.
|
32
32
|
For example in Rails, set above line in production.rb as your environment.
|
33
33
|
ENV['LC_ALL'] = 'en_us.utf8' # or ja_JP.utf8 etc.
|
34
|
-
cf:
|
34
|
+
cf: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4733494
|
35
35
|
(Thanks Paul for this information).
|
36
36
|
|
37
37
|
artonx@yahoo.co.jp
|
metadata
CHANGED
@@ -1,19 +1,19 @@
|
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- arton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-28 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.
|
15
15
|
|
16
|
-
'
|
16
|
+
'
|
17
17
|
email: artonx@gmail.com
|
18
18
|
executables: []
|
19
19
|
extensions:
|
@@ -44,10 +44,7 @@ files:
|
|
44
44
|
- readme.txt
|
45
45
|
- samples/filechooser.rb
|
46
46
|
- samples/unzip.rb
|
47
|
-
- test/anon-test-50.rb
|
48
47
|
- test/anon-test-60.rb
|
49
|
-
- test/anon.rb
|
50
|
-
- test/b.rb
|
51
48
|
- test/exttest.rb
|
52
49
|
- test/gctest.rb
|
53
50
|
- test/jartest.jar
|
@@ -71,7 +68,6 @@ files:
|
|
71
68
|
- test/test_osxjvm.rb
|
72
69
|
- test/test_osxload.rb
|
73
70
|
- test/test_unload.rb
|
74
|
-
- test/x.rb
|
75
71
|
homepage: https://www.artonx.org/collabo/backyard/?RubyJavaBridge
|
76
72
|
licenses:
|
77
73
|
- LGPL-2.1-or-later
|
@@ -93,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
89
|
requirements:
|
94
90
|
- none
|
95
91
|
- JDK 5.0
|
96
|
-
rubygems_version: 3.4.
|
92
|
+
rubygems_version: 3.4.10
|
97
93
|
signing_key:
|
98
94
|
specification_version: 4
|
99
95
|
summary: Ruby Java bridge
|
data/test/anon-test-50.rb
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
require 'rjb'
|
2
|
-
Rjb::load
|
3
|
-
begin
|
4
|
-
Rjb::throw('java.lang.NumberFormatException', 'test')
|
5
|
-
Rjb::throw(Rjb::import('java.lang.NumberFormatException').new('test'))
|
6
|
-
rescue NumberFormatException => e
|
7
|
-
puts "I expect a NumberFormatException to be thrown"
|
8
|
-
rescue Exception => e
|
9
|
-
puts "I at least expect *some* excetpion to be thrown"
|
10
|
-
else
|
11
|
-
puts "Unexpectedly no exception is thrown"
|
12
|
-
end
|
13
|
-
|
data/test/anon.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
require 'rjb'
|
2
|
-
Rjb::load
|
3
|
-
begin
|
4
|
-
Rjb::import('java.lang.Integer').parseInt('x')
|
5
|
-
rescue NumberFormatException => e
|
6
|
-
puts e.class
|
7
|
-
puts e.message
|
8
|
-
begin
|
9
|
-
puts (StandardError === e).to_s
|
10
|
-
raise e
|
11
|
-
rescue => f
|
12
|
-
puts f.class
|
13
|
-
puts f.message
|
14
|
-
puts f.cause.inspect
|
15
|
-
puts f.exception.inspect
|
16
|
-
if e.class == f.class
|
17
|
-
puts "I expect the equality to be true"
|
18
|
-
else
|
19
|
-
puts "Unexpectedly the re-raised Java exception has changed " +
|
20
|
-
"from a #{e.class} into a #{f.class}"
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
data/test/b.rb
DELETED