[MacRuby/MacRuby] 9345af: IO.popen will return/yield subclass instances base...
4 May
2011
4 May
'11
3:46 a.m.
Branch: refs/heads/master Home: https://github.com/MacRuby/MacRuby Commit: 9345af1ff62bc770dd9a5bc3e25db4dbd7a588c3 https://github.com/MacRuby/MacRuby/commit/9345af1ff62bc770dd9a5bc3e25db4dbd7... Author: Watson <watson1978@gmail.com> Date: 2011-05-03 (Tue, 03 May 2011) Changed paths: M io.c Log Message: ----------- IO.popen will return/yield subclass instances based on receiver. Test Script: {{{ require 'test/unit/assertions.rb' include Test::Unit::Assertions class SubIO < IO; end ruby = "ruby" args = ['-e', '$>.write($<.read)'] f = SubIO.popen([ruby] + args, 'r+') assert_equal(SubIO, f.class) f.close SubIO.popen([ruby] + args, 'r+') { |io| assert_equal(SubIO, io.class) } puts :ok }}}
5302
Age (days ago)
5302
Last active (days ago)
0 comments
1 participants
participants (1)
-
noreply@github.com