jruby/jruby — pull request #2141 by cheald (2014-11-07 07:51:54+00:00)
Title: Update RubyIO#ensureYieldClose to match ruby-bug 10153 behavior

2.2.0 now only swallows "closed stream" errors on IO close, and explicitly
checks for both respond_to?(:closed?) (and tests it) and respond_to?(:close)
before attempting to close an IO.

Added ENOSPC helper; the un-swallowing of errors exposed another bug where
JRuby was throwing an unknown SystemCallError on a full disk due to lack of
a string check for the ENOSPC IO error.