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
TZInfo::Data v1.2014.2 Released
    Philip Ross - 2014-03-25 22:32
TZInfo v0.3.39 Released
    Philip Ross - 2014-03-09 20:23
TZInfo::Data v1.2014.1 Released
    Philip Ross - 2014-03-09 20:00
Automatic Ruby 14.2.0 has been released!
    id 774 - 2014-02-26 06:23
kramdown 1.3.2 released
    Thomas Leitner - 2014-02-16 08:35

 

Forums | Admin

Discussion Forums: rjb-1.3.5-was-released

Start New Thread Start New Thread

 

Topic Topic Starter Replies Last Post