Ok, I've just attached the files...too complicated to find somewhere to put them..
test.class is the class "ruby.test". jruby.jar is JRuby's jar. Run with:
java -client -cp jruby.jar:. ruby.test
(assuming you put the test.class in ./ruby)
It should crash under any version of JDK 6 client compiler.
I've also attached the Ruby source. If you want to just run it directly, and JRuby will compile it before run, do it like this:
java -jar jruby.jar org.jruby.Main test.rb
- Charlie
$ok = true
def getc
if $ok
$ok = false
nil
else
$ok = true
50
end
end
def gets
c = getc or return
l = ""
begin
l.concat c unless c == "\r"
break if c == "\n"
end while c = getc
l
end
loop { gets }