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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a210706c728d5d00f5c4c34fc0b4309404ec5303a5b7cd6d52264d0c0e838be5
4
- data.tar.gz: 49968075c5e92ccd2083d1943fd95dd5856b8cc6a1c2372f48f4284ce9db7ac2
3
+ metadata.gz: c844ae35b7db5e279feb4088495040f16f520173a65c096b564a88a2816faba6
4
+ data.tar.gz: 842e428865248d83b1a49d61ffa5b654586ecb80cf566e78b9b6ff4c0a7a5dbf
5
5
  SHA512:
6
- metadata.gz: 811023ee8c809b9221cf3e7c802d0697bc2bec4c8491d832fef925e65005c355967bb8429e4f3bcf195856e11a6fb46fbdb89469784746260a9d8a07d6c728fd
7
- data.tar.gz: 14ac35e925c6a0bdb09cc8ace7f1f2157e617cdafef5c64689fcb2da76bd67bfceee0638023240da35d34f51dfa9131ed508ff7df6f05346cdf8594ca09a51e2
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
@@ -4,5 +4,5 @@
4
4
  #define HAVE_NL_LANGINFO 1
5
5
  #define HAVE_SETLOCALE 1
6
6
  #define HAVE_GETENV 1
7
- #define RJB_RUBY_VERSION_CODE 320
7
+ #define RJB_RUBY_VERSION_CODE 278
8
8
  #endif
data/ext/rjb.c CHANGED
@@ -14,7 +14,7 @@
14
14
  *
15
15
  */
16
16
 
17
- #define RJB_VERSION "1.6.7"
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 you sciprt.
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: http://bugs.sun.com/view_bug.do?bug_id=4733494
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.7
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-02-15 00:00:00.000000000 Z
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.2
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
@@ -1,13 +0,0 @@
1
- class TestError < StandardError
2
- end
3
-
4
- begin
5
- raise TestError.new
6
- rescue => e
7
- puts e.class
8
- begin
9
- raise e, 'abc'
10
- rescue => f
11
- puts f.class
12
- end
13
- end
data/test/x.rb DELETED
@@ -1,10 +0,0 @@
1
- begin
2
- i.foo
3
- rescue => e
4
- puts e.class
5
- begin
6
- raise e
7
- rescue => f
8
- puts f.class
9
- end
10
- end