rjb 1.4.8 → 1.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 00d95340188f51cbc874df119d92f221f83b659f
4
- data.tar.gz: 93d627c931026cc755d89d2c48c89b9ceb0b2e54
3
+ metadata.gz: edd42f717ffa2d437e0384f16a568be037da995c
4
+ data.tar.gz: d358b67fb76943b1afce022739f2219b5dc2d19d
5
5
  SHA512:
6
- metadata.gz: da36ef4752b6d7fbe57d583c237e7194e66a295170618d1ea03df45c6b3178a92fe8189f931a4e19594571e127ac1583dd254a577e73d596066f9c0c2be49f1d
7
- data.tar.gz: 09fb48512599df21f7d61c2686c65c9226dab9c6e226a1037f0fc157ea824f68a46999919ad1dfbca7596880c4b46d8a446b43dc47767205d902795a5cf36082
6
+ metadata.gz: bfedeefc159b9365f9e89dc8233cd19aae57c77401884412694d55678db74f76fec6706590b0492563021a003e74fe5b187ea9cbb371f76e8c2a5d9f5e118b33
7
+ data.tar.gz: f83c4a7f1c700655cbfd1feea42257edd22c444b4b5f24947d625229baaddf2a33e49f985227c98b83183c75daf2a04aa25a7d98afa739dc2415bf696b112a4c
data/ChangeLog CHANGED
@@ -1,3 +1,14 @@
1
+ Fri Jan 4 2014 arton
2
+ *test/Test.java
3
+ *test/rjbtest.jar
4
+ add inner exception test
5
+ *test/test.java
6
+ add inner exception test
7
+ Fri Jan 3 2014 arton
8
+ *ext/rjb.c
9
+ RJB_VERSION -> 1.4.9
10
+ *ext/rjbexception.c
11
+ make J#cause to the instance method for resolving Ruby 2.1 confliction.
1
12
  Sun Jun 23 2013 arton
2
13
  *ext/rjb.c
3
14
  RJB_VERSION -> 1.4.8
@@ -1,6 +1,7 @@
1
1
  #ifndef EXTCONF_H
2
2
  #define EXTCONF_H
3
3
  #define HAVE_JNI_H 1
4
+ #define HAVE_NL_LANGINFO 1
4
5
  #define HAVE_SETLOCALE 1
5
6
  #define HAVE_GETENV 1
6
7
  #define RJB_RUBY_VERSION_CODE 210
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.4.8"
18
+ #define RJB_VERSION "1.4.9"
19
19
 
20
20
  #include "ruby.h"
21
21
  #include "extconf.h"
@@ -32,6 +32,11 @@ static VALUE missing_delegate(int argc, VALUE* argv, VALUE self)
32
32
  return rb_funcall(rb_ivar_get(self, rb_intern("@cause")), rmid, argc - 1, argv + 1);
33
33
  }
34
34
 
35
+ static VALUE get_cause(VALUE self)
36
+ {
37
+ return rb_funcall(rb_ivar_get(self, rb_intern("@cause")), rb_intern("cause"), 0);
38
+ }
39
+
35
40
  static VALUE exception_to_s(VALUE self)
36
41
  {
37
42
  return rb_funcall(rb_ivar_get(self, rb_intern("@cause")),
@@ -66,6 +71,7 @@ VALUE rjb_get_exception_class(JNIEnv* jenv, jstring str)
66
71
  if (rexp == Qnil)
67
72
  {
68
73
  rexp = rb_define_class(pcls, rb_eStandardError);
74
+ rb_define_method(rexp, "cause", get_cause, 0);
69
75
  rb_define_method(rexp, "method_missing", missing_delegate, -1);
70
76
  rb_define_method(rexp, "to_str", exception_to_s, 0);
71
77
  #if defined(HAVE_RB_HASH_ASET) || defined(RUBINIUS)
data/readme.txt CHANGED
@@ -29,7 +29,7 @@ you must set LD_LIBRARY_PATH environmental variable to run rjb.
29
29
  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.
30
30
  For example in Rails, set above line in production.rb as your environment.
31
31
  ENV['LC_ALL'] = 'en_us.utf8' # or ja_JP.utf8 etc.
32
- cf: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4733494
32
+ cf: http://bugs.sun.com/view_bug.do?bug_id=4733494
33
33
  (Thanks Paul for this information).
34
34
 
35
35
  artonx@yahoo.co.jp
Binary file
Binary file
Binary file
@@ -810,6 +810,19 @@ class TestRjb < Test::Unit::TestCase
810
810
  end
811
811
  end
812
812
  end
813
+
814
+
815
+ def test_inner_exception
816
+ test = import('jp.co.infoseek.hp.arton.rjb.Test').new
817
+ begin
818
+ test.cause_exception
819
+ flunk("no exception")
820
+ rescue IllegalStateException => e
821
+ ia = e.cause
822
+ assert_equal('bad argument', ia.message)
823
+ assert_equal('java.lang.IllegalArgumentException', ia._classname)
824
+ end
825
+ end
813
826
 
814
827
  class CbTest
815
828
  def method(l, s, i, d, str)
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.4.8
4
+ version: 1.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - arton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-23 00:00:00.000000000 Z
11
+ date: 2014-01-03 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.
@@ -18,49 +18,50 @@ extensions:
18
18
  - ext/extconf.rb
19
19
  extra_rdoc_files: []
20
20
  files:
21
+ - COPYING
22
+ - ChangeLog
23
+ - data/rjb/jp/co/infoseek/hp/arton/rjb/RBridge.class
21
24
  - ext/RBridge.java
22
- - ext/load.c
23
- - ext/riconv.c
24
- - ext/rjb.c
25
- - ext/rjbexception.c
25
+ - ext/depend
26
26
  - ext/extconf.h
27
+ - ext/extconf.rb
27
28
  - ext/jniwrap.h
28
29
  - ext/jp_co_infoseek_hp_arton_rjb_RBridge.h
30
+ - ext/load.c
31
+ - ext/riconv.c
29
32
  - ext/riconv.h
33
+ - ext/rjb.c
30
34
  - ext/rjb.h
31
- - ext/depend
32
- - data/rjb/jp/co/infoseek/hp/arton/rjb/RBridge.class
35
+ - ext/rjbexception.c
33
36
  - lib/rjb.rb
34
37
  - lib/rjbextension.rb
38
+ - readme.sj
39
+ - readme.txt
35
40
  - samples/filechooser.rb
36
41
  - samples/unzip.rb
42
+ - test/Test$TestTypes.class
43
+ - test/Test.class
44
+ - test/Two.class
45
+ - test/TwoCaller.class
37
46
  - test/exttest.rb
38
47
  - test/gctest.rb
48
+ - test/jartest.jar
39
49
  - test/jartest.rb
50
+ - test/jartest2.jar
40
51
  - test/jartest2.rb
41
52
  - test/jartest3.rb
42
- - test/listtest.rb
43
- - test/osx_jvmcheck.rb
44
- - test/test.rb
45
- - test/test_osxjvm.rb
46
- - test/test_osxload.rb
47
- - test/test_unload.rb
48
- - test/Test$TestTypes.class
49
- - test/Two.class
50
- - test/TwoCaller.class
51
53
  - test/jp/co/infoseek/hp/arton/rjb/CallbackTest$Callback.class
52
54
  - test/jp/co/infoseek/hp/arton/rjb/CallbackTest.class
53
55
  - test/jp/co/infoseek/hp/arton/rjb/IBase.class
54
56
  - test/jp/co/infoseek/hp/arton/rjb/Test$TestTypes.class
55
57
  - test/jp/co/infoseek/hp/arton/rjb/Test.class
56
- - test/jartest.jar
57
- - test/jartest2.jar
58
+ - test/listtest.rb
59
+ - test/osx_jvmcheck.rb
58
60
  - test/rjbtest.jar
59
- - COPYING
60
- - ChangeLog
61
- - readme.sj
62
- - readme.txt
63
- - ext/extconf.rb
61
+ - test/test.rb
62
+ - test/test_osxjvm.rb
63
+ - test/test_osxload.rb
64
+ - test/test_unload.rb
64
65
  homepage: http://rjb.rubyforge.org/
65
66
  licenses: []
66
67
  metadata: {}
@@ -70,19 +71,19 @@ require_paths:
70
71
  - lib
71
72
  required_ruby_version: !ruby/object:Gem::Requirement
72
73
  requirements:
73
- - - '>='
74
+ - - ">="
74
75
  - !ruby/object:Gem::Version
75
76
  version: 1.8.2
76
77
  required_rubygems_version: !ruby/object:Gem::Requirement
77
78
  requirements:
78
- - - '>='
79
+ - - ">="
79
80
  - !ruby/object:Gem::Version
80
81
  version: '0'
81
82
  requirements:
82
83
  - none
83
84
  - JDK 5.0
84
85
  rubyforge_project: rjb
85
- rubygems_version: 2.0.2
86
+ rubygems_version: 2.2.0
86
87
  signing_key:
87
88
  specification_version: 4
88
89
  summary: Ruby Java bridge