Issue Type: Bug Bug
Affects Versions: JRuby 1.7.0.pre2
Assignee: Thomas E Enebo
Attachments: test.rb
Created: 13/Aug/12 2:58 AM
Description:

I've noticed a bit of strange behaviour in the attached test program. I have:

  • A main function with a top-level begin/ensure block, where the ensure block is supposed to perform some sort of cleanup at program exit.
  • A 'while true' loop that runs a bit of code in a loop. That code is expected to throw an exception for the first few iterations, and the loop continues until the exceptions stop (think of polling a web server until it starts up)
  • When the exceptions stop, the loop is terminated with a 'break'

What I'm seeing: the code immediately following this loop never runs. We jump straight to the 'ensure' block and the program terminates. What I see:

$ /usr/local/jdk1.7.0_02/bin/java -cp jruby-complete-1.7.0.preview2.jar org.jruby.Main test.rb 
Around we go
Around we go
Around we go
Ensure block

the statement 'puts "Why doesn't this get printed?"' never seems to fire.

I've tested against the following JVMs:

java version "1.6.0_30"
Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
Java HotSpot(TM) 64-Bit Server VM (build 20.5-b03, mixed mode)
java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)

and I see the same issue with jruby-complete-1.6.7.2.jar as with jruby-complete-1.7.0.preview2.jar.

Please let me know if I can do any debugging from this side.

Cheers,

Mark

Environment: 64-bit Debian 6.0.3 running JDK 1.7.0_02
Project: JRuby
Priority: Minor Minor
Reporter: Mark Triggs
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to