Branch: refs/heads/master Home: https://github.com/MacRuby/MacRuby Commit: cc4016504a68173aa97fbcb3b9abd0ecd121ff16 https://github.com/MacRuby/MacRuby/commit/cc4016504a68173aa97fbcb3b9abd0ecd1... Author: Watson <watson1978@gmail.com> Date: 2011-05-12 (Thu, 12 May 2011) Changed paths: M io.c Log Message: ----------- IO#reopen will raise an exception when receiver or passed IO object was frozen. Test Script: {{{ require 'test/unit/assertions.rb' include Test::Unit::Assertions File.delete("/tmp/foo") if File.exists?("/tmp/foo") r, w = IO.pipe w.freeze path = "/tmp/bar" assert_raise(RuntimeError){ w.reopen(path, "w") } f = File.open("/tmp/foo", "w") assert_raise(RuntimeError){ w.reopen(f) } f.freeze assert_raise(RuntimeError){ r.reopen(f) } puts :ok }}}