[ruby-core:64754] [ruby-trunk - Feature #10173] Remove meaningless ensure

From: mail@...
Date: 2014-09-04 05:40:26 UTC
List: ruby-core #64754
Issue #10173 has been updated by gogo tanaka.


@ Tomoyuki Chikanaga san

Thank you for letting me know.

I have reported to "https://github.com/rubygems/rubygems/" as you said.

https://github.com/rubygems/rubygems/pull/1003

Thanks, gogo.

----------------------------------------
Feature #10173: Remove meaningless ensure
https://bugs.ruby-lang.org/issues/10173#change-48643

* Author: gogo tanaka
* Status: Open
* Priority: Normal
* Assignee: 
* Category: lib
* Target version: 
----------------------------------------
I suppose 'empty ensure' like that ↓ has no meaning,

```
begin
  r.document args
rescue Errno::EACCES => e
  dirname = File.dirname e.message.split("-")[1].strip
  raise Gem::FilePermissionError, dirname
rescue Interrupt => e
  raise e
rescue Exception => ex
  alert_error "While generating documentation for #{@spec.full_name}"
  ui.errs.puts "... MESSAGE:   #{ex}"
  ui.errs.puts "... RDOC args: #{args.join(' ')}"
  ui.backtrace ex
  ui.errs.puts "(continuing with the rest of the installation)"
ensure
end
```

So I remove that.

---Files--------------------------------
EmptyEnsure.PATCH (385 Bytes)


-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next