rjb 1.0.7 → 1.0.8

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.
Files changed (3) hide show
  1. data/ext/rjb.c +5 -2
  2. data/test/test.rb +4 -1
  3. metadata +1 -1
data/ext/rjb.c CHANGED
@@ -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 19 2007-09-14 14:59:29Z arton $
15
+ * $Id: rjb.c 21 2007-09-15 09:32:45Z arton $
16
16
  */
17
17
 
18
- #define RJB_VERSION "1.0.7"
18
+ #define RJB_VERSION "1.0.8"
19
19
 
20
20
  #include "ruby.h"
21
21
  #include "st.h"
@@ -538,6 +538,9 @@ static VALUE jv2rv_withprim(JNIEnv* jenv, jobject o)
538
538
  case 'c':
539
539
  jv.c = (*jenv)->CallCharMethod(jenv, o, jpcvt[i].to_prim_id);
540
540
  break;
541
+ case 'l':
542
+ jv.j = (*jenv)->CallLongMethod(jenv, o, jpcvt[i].to_prim_id);
543
+ break;
541
544
  default:
542
545
  rb_raise(rb_eRuntimeError, "no convertor defined(%d)", i);
543
546
  break;
@@ -1,5 +1,5 @@
1
1
  #!/usr/local/env ruby
2
- # $Id: test.rb 19 2007-09-14 14:59:29Z arton $
2
+ # $Id: test.rb 21 2007-09-15 09:32:45Z arton $
3
3
 
4
4
  require 'test/unit'
5
5
  require 'rjb'
@@ -456,6 +456,9 @@ class TestRjb < Test::Unit::TestCase
456
456
  jByte = Rjb::import('java.lang.Byte')
457
457
  assert_equal(5, jByte.valueOf('5'))
458
458
  assert_equal(-6, jByte.valueOf('-6'))
459
+ jLong = Rjb::import('java.lang.Long')
460
+ assert_equal(0x7000000000000000, jLong.valueOf('8070450532247928832'))
461
+ assert_equal(-9223372036854775807, jLong.valueOf('-9223372036854775807'))
459
462
  end
460
463
  end
461
464
 
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: rjb
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.7
6
+ version: 1.0.8
7
7
  date: 2007-09-15 00:00:00 +09:00
8
8
  summary: Ruby Java bridge
9
9
  require_paths: