When defining new on a class singleton that gets aliased to another name, super inside the class dispatches to the aliased, not the original name. MRI and RBX both behave different here and dispatch to superclasses original named method.
class << self
alias_method :bar, :new
jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on OpenJDK 64-Bit Server VM 1.7.0_40-b31 +indy [linux-am
mbj@mbj ~/devel/crash (master*) % jruby crash.rb
NoMethodError: super: no superclass method `bar'
new at crash.rb:4
(root) at crash.rb:13
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]
mbj@mbj ~/devel/crash (master*) % ruby crash.rb
I reduced this bug from around 20kloc, and hope you can fix it in the next minor release. I can trigger this very easily from my production code. Using 1.7.2 now where this bug does not exist.
Update, turns out that using interpreted mode -X-C makes this bug disappear.
Here is my full java -version
java version "1.7.0_40"
OpenJDK Runtime Environment (IcedTea 2.4.1) (ArchLinux build 7.u40_2.4.1-1-x86_64)
OpenJDK 64-Bit Server VM (build 24.0-b50, mixed mod
I believe this is fixed on master.
$ jruby -v crash.rb
jruby 1.7.5.dev (1.9.3p392) 2013-08-19 362730c on Java HotSpot(TM) 64-Bit Server VM 1.7.0_25-b15 [darwin-x86_64]
You can trying a package from http://ci.jruby.org/snapshots/master/ or building it yourself.
I'm closing this now, but let me know if it's still a problem for you.