ruby/ruby — pull request #702 by JackDanger (2014-08-17 20:27:25+00:00)
Title: Don't attempt to close a closed IO object

Because the yield runs arbitrary application code it's possible the
underlying file descriptor is closed during the block.
This prevents developers from having to wrap all `CSV.open` calls in a `begin`...`rescue` block to catch `Errno::EBADF`