* io.c (rb_io_s_pipe): Close pipes if io_encoding_set() raises an
  exception.
  (io_encoding_set_v): New function.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e