Skip to content

Instantly share code, notes, and snippets.

---
layout: post
title: JRuby 1.5.6 Released
---
The JRuby community is pleased to announce the release of JRuby 1.5.6.
- Homepage: [http://www.jruby.org/](http://www.jruby.org/)
- Download: [http://www.jruby.org/download](http://www.jruby.org/download)
JRuby 1.5.6 is a minor follow-up release to address problems with mirroring
module Benchmark
def Benchmark::times()
puts Process.times
end
end
Benchmark.times
public class SafeArray {
/**
* Contains a compressed sequence of n-dimensions of array values.
*/
private Variant[] values;
// Each array dimensions first index in the pangea values array
private int valueIndexFor[];
// Which index represents the start of each elements array (arrays can
// have non-zero index value.
require 'rubygems'
require 'virtualbox'
vm = VirtualBox::VM.find("myvm")
# Let's first print out some basic info about the VM
#puts "Memory: #{vm.memory_size}"
# Let's modify the memory and name...
#vm.memory_size = 360
require 'java'
java_import java.awt.BorderLayout
java_import java.awt.Container
java_import java.awt.GridLayout
java_import java.awt.event.ActionEvent
java_import java.awt.event.ActionListener
java_import javax.swing.JButton
java_import javax.swing.JFileChooser
1.9.2 ~/work/jruby master* 902% jruby --1.9 -S rails new heh
create
create README
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
create app/controllers/application_controller.rb
create app/helpers/application_helper.rb
@enebo
enebo / gist:761255
Created December 31, 2010 19:04
Welcome page and server running
Ruby version 1.9.2 (java)
RubyGems version 1.3.7
Rack version 1.2
Rails version 3.0.3
Active Record version 3.0.1
Action Pack version 3.0.3
Active Resource version 3.0.3
Action Mailer version 3.0.3
Active Support version 3.0.3
Middleware
r = /a/u
puts r.encoding
r2 = Regexp.new(r)
p r2
puts r2.encoding
puts r2.fixed_encoding?
@enebo
enebo / oracle_prepared.rb
Created January 14, 2011 00:12
Shows how you can leverage some of Java's Java integration features. Original code from http://theblasfrompas.blogspot.com/2011/01/retrieving-dbmsoutput-from-plsql-in.html.
require 'java'
require 'C:/jdev/jdcbdrivers/11.2/ojdbc6.jar'
require 'lib/jdbc_connection'
require 'lib/dbms_output'
# v--- java_import is better than import if you end up using rake for testing
# v--- java,org,edu,javax can all be supplied bare-word instead of string form
java_import java.sql.CallableStatement
java_import java.sql.Connection
@enebo
enebo / 1.8_nasty.rb
Created January 18, 2011 20:39
Yuck
class Base
def meth(a, b = 4)
# puts a.inspect, b.inspect
end
end
class Derived < Base
d = 1
define_method(:meth) do |a, d|
puts "d before super #{d}"