When running my rails app test suite against jruby-head on jdk7u40 with invokedynamic enabled I run into some java.lang.OutOfMemoryError as well as some Java::JavaLang::InternalError. See the gists below for the output.
I am able to get around the errors by changing my JRUBY_OPTS from -J-Xmx1g -J-XX:MaxPermSize=256m to -J-Xmx2g -J-XX:MaxPermSize=512m.
https://gist.github.com/atambo/6553830
https://gist.github.com/atambo/6554716