{"action":"opened","issue":{"url":"https://api.github.com/repos/jruby/jruby/issues/3055","labels_url":"https://api.github.com/repos/jruby/jruby/issues/3055/labels{/name}","comments_url":"https://api.github.com/repos/jruby/jruby/issues/3055/comments","events_url":"https://api.github.com/repos/jruby/jruby/issues/3055/events","html_url":"https://github.com/jruby/jruby/issues/3055","id":88555693,"number":3055,"title":"Cannot delete file after requiring it on Windows in 9.0.0.0.rc1","user":{"login":"jeremyevans","id":3846,"avatar_url":"https://avatars.githubusercontent.com/u/3846?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremyevans","html_url":"https://github.com/jeremyevans","followers_url":"https://api.github.com/users/jeremyevans/followers","following_url":"https://api.github.com/users/jeremyevans/following{/other_user}","gists_url":"https://api.github.com/users/jeremyevans/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremyevans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremyevans/subscriptions","organizations_url":"https://api.github.com/users/jeremyevans/orgs","repos_url":"https://api.github.com/users/jeremyevans/repos","events_url":"https://api.github.com/users/jeremyevans/events{/privacy}","received_events_url":"https://api.github.com/users/jeremyevans/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-15T22:21:59Z","updated_at":"2015-06-15T22:21:59Z","closed_at":null,"body":"Looks like this broke between pre1 and pre2:\r\n\r\n```\r\nD:\\>C:\\jruby-9.0.0.0.pre1\\bin\\jruby -e \"File.open('a.rb', 'a'){}; require './a.rb'; File.delete('a.rb'); p 1\"\r\n1\r\n\r\nD:\\>C:\\jruby-9.0.0.0.pre2\\bin\\jruby -e \"File.open('a.rb', 'a'){}; require './a.rb'; File.delete('a.rb'); p 1\"\r\nErrno::EACCES: Permission denied - a.rb\r\n  delete at org/jruby/RubyFile.java:1116\r\n   <top> at -e:1\r\n\r\nD:\\>C:\\jruby-9.0.0.0.rc1\\bin\\jruby -e \"File.open('a.rb', 'a'){}; require './a.rb'; File.delete('a.rb'); p 1\"\r\nErrno::EACCES: Permission denied - a.rb\r\n  delete at org/jruby/RubyFile.java:1116\r\n   <top> at -e:1\r\n```\r\n\r\nIt doesn't matter if the `a.rb` file already exists or if the process creates it, trying to delete it after requiring it raises the error.\r\n\r\nFound by running Sequel's specs.\r\n\r\nI didn't test on a *nix, but it's unlikely to be a problem there as *nix allows deletion of files that are in use."}}