{"action":"created","issue":{"url":"https://api.github.com/repos/jruby/jruby/issues/5439","repository_url":"https://api.github.com/repos/jruby/jruby","labels_url":"https://api.github.com/repos/jruby/jruby/issues/5439/labels{/name}","comments_url":"https://api.github.com/repos/jruby/jruby/issues/5439/comments","events_url":"https://api.github.com/repos/jruby/jruby/issues/5439/events","html_url":"https://github.com/jruby/jruby/issues/5439","id":379610401,"node_id":"MDU6SXNzdWUzNzk2MTA0MDE=","number":5439,"title":"ensure from Java callback has wrong behavior","user":{"login":"yamam","id":12369962,"node_id":"MDQ6VXNlcjEyMzY5OTYy","avatar_url":"https://avatars2.githubusercontent.com/u/12369962?v=4","gravatar_id":"","url":"https://api.github.com/users/yamam","html_url":"https://github.com/yamam","followers_url":"https://api.github.com/users/yamam/followers","following_url":"https://api.github.com/users/yamam/following{/other_user}","gists_url":"https://api.github.com/users/yamam/gists{/gist_id}","starred_url":"https://api.github.com/users/yamam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamam/subscriptions","organizations_url":"https://api.github.com/users/yamam/orgs","repos_url":"https://api.github.com/users/yamam/repos","events_url":"https://api.github.com/users/yamam/events{/privacy}","received_events_url":"https://api.github.com/users/yamam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-12T03:50:56Z","updated_at":"2018-11-12T16:03:10Z","closed_at":null,"author_association":"NONE","body":"### Environment\r\n\r\njruby 9.2.3.0 (2.5.0) 2018-11-09 5833e2d Java HotSpot(TM) 64-Bit Server VM 25.191-b12 on 1.8.0_191-b12 +jit [mswin32-x86_64]\r\n\r\n### Expected Behavior\r\nJavaClass.java\r\n```java\r\nclass JavaClass\r\n{\r\n    public JavaClass(Callable proc)\r\n    {\r\n        proc.run();\r\n    }\r\n}\r\n```\r\n\r\ntest.rb\r\n```ruby\r\nimport 'JavaClass'\r\n\r\nvar = 0\r\n\r\npr = proc do |v|\r\n    puts \"pr is called\"\r\n    if var == 0\r\n        puts \"ERROR!\"\r\n    end\r\nend\r\n\r\nJavaClass.new do\r\n    begin\r\n        var = 1\r\n        puts \"call pr\"\r\n        pr.call\r\n    ensure\r\n        var = 0\r\n        puts \"ensure end\"\r\n    end\r\nend\r\n```\r\n\r\n```\r\njruby-9.2.0.0/bin/jruby test.rb\r\ncall pr\r\npr is called\r\nensure end\r\n```\r\n\r\n### Actual Behavior\r\n```\r\njruby-9.2.3.0/bin/jruby test.rb\r\ncall pr\r\npr is called\r\nERROR!\r\nensure end\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/jruby/jruby/issues/comments/437935011","html_url":"https://github.com/jruby/jruby/issues/5439#issuecomment-437935011","issue_url":"https://api.github.com/repos/jruby/jruby/issues/5439","id":437935011,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzkzNTAxMQ==","user":{"login":"headius","id":10135,"node_id":"MDQ6VXNlcjEwMTM1","avatar_url":"https://avatars3.githubusercontent.com/u/10135?v=4","gravatar_id":"","url":"https://api.github.com/users/headius","html_url":"https://github.com/headius","followers_url":"https://api.github.com/users/headius/followers","following_url":"https://api.github.com/users/headius/following{/other_user}","gists_url":"https://api.github.com/users/headius/gists{/gist_id}","starred_url":"https://api.github.com/users/headius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/headius/subscriptions","organizations_url":"https://api.github.com/users/headius/orgs","repos_url":"https://api.github.com/users/headius/repos","events_url":"https://api.github.com/users/headius/events{/privacy}","received_events_url":"https://api.github.com/users/headius/received_events","type":"User","site_admin":false},"created_at":"2018-11-12T16:03:10Z","updated_at":"2018-11-12T16:03:10Z","author_association":"MEMBER","body":"This does not appear to be affected by Java integration; if I make `JavaClass.new` into a pure-Ruby method it behaves the same way. I will update the issue description to reflect this."}}
{"actor":{"display_login":"headius"}}