[macruby-changes] [MacRuby/MacRuby] ef2e8a: Implements the ARGF.binmode?
noreply at github.com
noreply at github.com
Wed May 11 20:23:29 PDT 2011
Branch: refs/heads/master
Home: https://github.com/MacRuby/MacRuby
Commit: ef2e8a46e5ae652e4254c2d6e35b95c96db9fca4
https://github.com/MacRuby/MacRuby/commit/ef2e8a46e5ae652e4254c2d6e35b95c96db9fca4
Author: Watson <watson1978 at 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/b87fa11fe09133001040809e2db937138f5cee48
Author: Watson <watson1978 at 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
More information about the macruby-changes
mailing list