[MacRuby/MacRuby] ef2e8a: Implements the ARGF.binmode?
Branch: refs/heads/master Home: https://github.com/MacRuby/MacRuby Commit: ef2e8a46e5ae652e4254c2d6e35b95c96db9fca4 https://github.com/MacRuby/MacRuby/commit/ef2e8a46e5ae652e4254c2d6e35b95c96d... Author: Watson <watson1978@gmail.com> Date: 2011-05-11 (Wed, 11 May 2011) Changed paths: M io.c Log Message: ----------- Implements the ARGF.binmode? Commit: b87fa11fe09133001040809e2db937138f5cee48 https://github.com/MacRuby/MacRuby/commit/b87fa11fe09133001040809e2db937138f... Author: Watson <watson1978@gmail.com> Date: 2011-05-11 (Wed, 11 May 2011) Changed paths: M io.c R spec/frozen/tags/macruby/core/argf/close_tags.txt Log Message: ----------- ARGF.to_io will return an IO object representing the current file. Test Script: {{{ require 'test/unit/assertions.rb' include Test::Unit::Assertions File.open("/tmp/foo", "w") {|f| f.puts "foo"} File.open("/tmp/bar", "w") {|f| f.puts "bar"} files = ["/tmp/foo", "/tmp/bar"] ARGV.replace files files.each do io = ARGF.to_io ARGF.close assert_equal(true, io.closed?) end puts :ok }}} Compare: https://github.com/MacRuby/MacRuby/compare/5a978aa...b87fa11
participants (1)
-
noreply@github.com