Diff
Modified: MacRuby/branches/experimental/io.c (1268 => 1269)
--- MacRuby/branches/experimental/io.c 2009-03-30 18:13:14 UTC (rev 1268)
+++ MacRuby/branches/experimental/io.c 2009-03-30 18:48:58 UTC (rev 1269)
@@ -2203,7 +2203,9 @@
if (fd == -1) {
rb_sys_fail(NULL);
}
- prepare_io_from_fd(ExtractIOStruct(io), fd, convert_mode_string_to_fmode(modes));
+ rb_io_t *io_struct = ExtractIOStruct(io);
+ prepare_io_from_fd(io_struct, fd, convert_mode_string_to_fmode(modes));
+ GC_WB(&io_struct->path, path);
return io;
}
Modified: MacRuby/branches/experimental/rakelib/spec.rake (1268 => 1269)
--- MacRuby/branches/experimental/rakelib/spec.rake 2009-03-30 18:13:14 UTC (rev 1268)
+++ MacRuby/branches/experimental/rakelib/spec.rake 2009-03-30 18:48:58 UTC (rev 1269)
@@ -29,11 +29,16 @@
KNOWN_GOOD_CORE_IO = %w{
closed
+ fileno
+ inspect
+ readchar
to_i
to_io
initialize
}
+ #
+
desc "Run all language known good spec files which should be fully green (does not use tags)"
task :green do
files = FileList["spec/frozen/language/{#{KNOWN_GOOD.join(',')}}_spec.rb"]
Modified: MacRuby/branches/experimental/spec/frozen/core/io/readchar_spec.rb (1268 => 1269)
--- MacRuby/branches/experimental/spec/frozen/core/io/readchar_spec.rb 2009-03-30 18:13:14 UTC (rev 1268)
+++ MacRuby/branches/experimental/spec/frozen/core/io/readchar_spec.rb 2009-03-30 18:48:58 UTC (rev 1269)
@@ -12,12 +12,12 @@
end
it "returns the next byte from the stream" do
- @file.readchar.should == 86
- @file.readchar.should == 111
- @file.readchar.should == 105
+ @file.readchar.should == 'V'
+ @file.readchar.should == 'o'
+ @file.readchar.should == 'i'
# read the rest of line
@file.readline.should == "ci la ligne une.\n"
- @file.readchar.should == 81
+ @file.readchar.should == 'Q'
end
it "raises EOFError when invoked at the end of the stream" do