JRuby 1.7.0.preview1 (RUBYOPT=--1.8) and java "1.7.0_05" - SystemStackError (stack level too deep)

Dear Friends,

I am delighted to be working on JRuby 1.7.0.preview1 and seek your help
on something that has tripped me.

Here’s my environment …

java version “1.7.0_05”
Java™ SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot™ 64-Bit Server VM (build 23.1-b03, mixed mode)
… RUBYOPT = --1.8 …
jruby 1.7.0.preview1 (ruby-1.8.7-p357) (2012-05-19 00c8c98) (Java
HotSpot™ 64-Bit Server VM 1.7.0_05) [darwin-x86_64-java]

And here’s what I am trying …

Trying to make a Rails 2.3.14 application work in above mentioned
environment.

This is the issue I am facing …

SystemStackError (stack level too deep):
org/jruby/RubyProc.java:269:in call' org/jruby/RubyProc.java:219:incall’
org/jruby/RubyProc.java:269:in call' org/jruby/RubyProc.java:219:incall’
org/jruby/RubyArray.java:1611:in each' app/controllers/application_controller.rb:291:inrender_payload’
app/controllers/application_controller.rb:346:in
render_create_or_error' app/controllers/messages_controller.rb:61:increate’
org/jruby/RubyKernel.java:1969:in send' org/jruby/RubyKernel.java:1969:insend’
org/jruby/RubyProc.java:269:in call' org/jruby/RubyProc.java:219:incall’
org/jruby/RubyArray.java:1611:in `each’

Kindly help by throwing some light on what could be happening.
I appreciate your help in advance.

Thanks
Naga

Just to be sure, does the same thing happen in 1.9 mode?

Good point. The changes are extensive for us to move to 1.9 mode, so my
initial attempt has been with 1.8 mode. I will try to make the changes
to move to 1.9 mode, and then give it a shot again. I will update this
post soon after the effort (roughly a week from now, as the changes are
extensive)

Thanks for the pointer, Jeffrey.

Naga

Ah, so this is an existing application?

So it works on JRuby 1.6.7 then?

If it does work on 1.6.7 in 1.8 mode and not 1.7-preview1 in 1.8 mode
then it sounds like a 1.7 bug (but I am not a jruby expert).

I have logged this issue - http://jira.codehaus.org/browse/JRUBY-6736

Yes, this is an existing application running fine on JRuby 1.6.7 in 1.8
mode.

Appears to be a JRuby 1.7 bug to me as well.