Again this testcase seems to be part of the one that is shipped with ruby 1.7.0 source .
While running this against Java 7 SR1 , I get the following error
So if we observed the lines pointed out in the above failure message , it is basically getting a "NoMethodError" from the "do...end" block rather than the "NameError" expected.
So further looking into the issue , the above can be recreated even with a simple change to testcase .
So here I have removed the assertion and added a "puts " statement instead. If I run this with Java 7 SR1 , I get the error as mentioned above where as with Java 6 I get "NameError" as expected .
As per http://www.ruby-doc.org/core-1.9.3/NameError.html documentation we should be getting the "NameError" error itself .
Again here also ,when I tried running jruby with "--debug" option ( on Java7 SR1 line) I see the testcase passes .
I have raised
JRUBY-6300 which was for slightly different issue but there too with "--debug" option it was passing . So I am not sure if these are related . If yes can you please let me know the build number where this is fixed . If not , can you please help with this issue . ?