[macruby-changes] [MacRuby/MacRuby] bf69e1: ARGF.file will return File object which has file p...

noreply at github.com noreply at github.com
Wed May 11 23:58:30 PDT 2011


Branch: refs/heads/master
Home:   https://github.com/MacRuby/MacRuby

Commit: bf69e12dbb9ef8c7643265a8ba757a21a867974a
    https://github.com/MacRuby/MacRuby/commit/bf69e12dbb9ef8c7643265a8ba757a21a867974a
Author: Watson <watson1978 at gmail.com>
Date:   2011-05-11 (Wed, 11 May 2011)

Changed paths:
  M io.c

Log Message:
-----------
ARGF.file will return File object which has file path.

Test Script:
{{{
require 'test/unit/assertions.rb'
include Test::Unit::Assertions

File.open("/tmp/foo", "w") {|f| f.puts "foo"}

files = ["/tmp/foo"]
ARGV.replace files

assert_kind_of(File, ARGF.file)
assert_equal("/tmp/foo", ARGF.file.path)

puts :ok
}}}




More information about the macruby-changes mailing list