[macruby-changes] [MacRuby/MacRuby] 725009: File#initialize will not accept what reinitialize.

noreply at github.com noreply at github.com
Thu May 5 05:37:07 PDT 2011


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

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

Changed paths:
  M io.c

Log Message:
-----------
File#initialize will not accept what reinitialize.

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

f = open("/tmp/test.txt", "w")
assert_raise(RuntimeError) do
  f.instance_eval { initialize("/tmp/test2.txt", "w") }
  f.puts "xxxx"
end

assert_equal("#<File:/tmp/test.txt>", f.inspect)

puts :ok
}}}




More information about the macruby-changes mailing list