|
Notes:
Rjb-1.3.4 has few new features.
1) From this release Rjb implicitly accepts String object as a byte array. And this String -> byte[] conversion causes bi-directional copying.
ex)
org = "abcdefghijklmn"
baip = import('java.io.ByteArrayInputStream')
ba = baip.new(org) # without new_with_sig, it call ByteArrayInputStream(byte[])
buff = "\0" * org.size
ba.read(buff) # without _invoke(:read, '[B', buff)
ba.close
assert_equal org, buff # Rjb copied the buffer contents into calling argument named 'buff'.
2) Rjb may not require iconv if Ruby's version > 1.9.0. (for suppressing warning on 1.9.3).
Changes:
*ext/rjb.c
RJB_VERSION -> 1.3.4
require 'iconv' only if RUBY_VERSION < 1.9.0
implicitly accept ruby's String for [B (byte array)
copy back byte[] contents into original String
*test/test.rb
add string buffer test (test_bothdirection_buffer)
|