Posted By: arton Tajima
Date: 2011-07-18 14:06
Summary: Rjb-1.3.5 was released
Project: Ruby Java Bridge

Rjb-1.3.5 supports \'block as annoymous inner class\' like JRuby.
You may put block as the last interface argument.
For example java.util.Arrays.binarySearch takes 3 arguments : the array, the key and the comparator.
So you may write just:
Arrays = Rjb::import(\'java.util.Arrays\')
a = [0, 1, -2, 3, 4, -5]
p Arrays.binarySearch(a, -3) {|m, o1, o2| o1.abs - o2.abs } #=> 3
#-------
The arguments for the block is just as Object#method_missing. The first argument is Symbol of the method caller called, after the second argments are the method\'s original arguments.

Another new feature for Win64. JDK for Win64 only installs server VM for AMD64, so Rjb also loads server vm. (Win32 Rjb loads client or classic as it did before).

Latest News
icalendar 1.4.0 Released
    Ryan Ahearn - 2013-05-21 23:17
BinData 1.5.0 - source moved to github
    Dion Mendel - 2013-05-21 11:10
v13.5.0 Released !!
    id 774 - 2013-05-18 12:28
Runt v0.9.0 Released
    Matthew Lipper - 2013-05-17 00:11
kramdown 1.0.2 released
    Thomas Leitner - 2013-05-09 06:58

 

Forums | Admin

Discussion Forums: rjb-1.3.5-was-released

Start New Thread Start New Thread

 

Topic Topic Starter Replies Last Post