A few minutes later: It turned out it wasn't a bug in JRuby at all. But the exception isn't as clear as it can be. > > Exception in thread "main" java.lang.ClassCastException: > > org.jruby.RubyRange > > at org.jruby.javasupport.JavaUtil.convertRubyToJava(JavaUtil.java:163) > > at org.jruby.Ruby.evalScript(Ruby.java:203) > > at Java2Ruby.main(Java2Ruby.java:33) This instead is where the error is: > > String rubySource = "listContents = []\n" + > > "(1..9).each { |x| listContents << " + > > "(\"cat number \" + x.to_s)}\n"; The each() will here return (1..9), which causes the classcast exception for RubyRange. I guess the intended code has an extra row at the end, like this: String rubySource = "listContents = []\n" + "(1..9).each { |x| listContents << " + "(\"cat number \" + x.to_s)}\n" + "listContents\n"; /Anders -- A n d e r s B e n g t s s o n | ndrsbngtssn / yahoo.se Stockholm, Sweden | _____________________________________________________ Fj VM pnçÓa héÍl pYahoo!s officielle VM-sajt www.yahoo.se/vm2002 HéÍl dig ajour med nyheter och resultat, med vinnare och föòlorare...