Jrubyc compiling as 1.9

Hi,

Is the following correct to compile and run programs which run
using ‘jruby --1.9’?

$ jruby --1.9 -S jrubyc program.rb
$ java -cp .:jruby-complete-1.6.3.jar program

This works for a program such as (using lambda expressions):

l = ->(x, y) {x + y}
puts l.call(3, 5)

but fails for (using named groups):

re = %r{
(?f\w+){0}
(?s\w+){0}
\g
\s\g
}x

md = re.match(“first second”)
puts “#{md[:a]} #{md[:b]}”

The latter works fine when run using ‘jruby --1.9 program.rb’,
but gives “(TypeError) Symbol as array index” when compiled.

Another odd error I get is for the simple:

not(true)

which produces the error “(NoMethodError) undefined method `!’ for
true:TrueClass” when compiled as above.

Am I missing something obvious? The above have come up by isolating
problems I’ve had trying to compile an application into a single jar for
distribution. I’m using the latest jruby 1.6.3, java 6.0, running on
Ubuntu 11.

thanks for any insight,

 Peter.