[macruby-changes] [3277] MacRuby/trunk

source_changes at macosforge.org source_changes at macosforge.org
Thu Jan 14 15:32:18 PST 2010


Revision: 3277
          http://trac.macosforge.org/projects/ruby/changeset/3277
Author:   ernest.prabhakar at gmail.com
Date:     2010-01-14 15:32:17 -0800 (Thu, 14 Jan 2010)
Log Message:
-----------
Dispatch::Source passes specs with new File API

Modified Paths:
--------------
    MacRuby/trunk/gcd.c
    MacRuby/trunk/spec/macruby/core/gcd/source_spec.rb
    MacRuby/trunk/spec/macruby/tags/macruby/core/gcd/source_tags.txt

Modified: MacRuby/trunk/gcd.c
===================================================================
--- MacRuby/trunk/gcd.c	2010-01-14 23:32:15 UTC (rev 3276)
+++ MacRuby/trunk/gcd.c	2010-01-14 23:32:17 UTC (rev 3277)
@@ -759,12 +759,11 @@
     assert(sourceptr != NULL);
     rb_source_t *src = RSource(sourceptr);
     VALUE io = src->rb_context;
-    printf("\nClosing IO object of type %s\n", object_getClassName((id)io));
-//    rb_io_close(io);
+    rb_io_close(io);
+//    Call rb_io_close directly since rb_vm_call aborts
 //    rb_vm_call(io, selClose, 0, NULL, false);
 }
 
-
 /* 
  *  call-seq:
  *    Dispatch::Source.new(type, handle, mask, queue) {|src| block}

Modified: MacRuby/trunk/spec/macruby/core/gcd/source_spec.rb
===================================================================
--- MacRuby/trunk/spec/macruby/core/gcd/source_spec.rb	2010-01-14 23:32:15 UTC (rev 3276)
+++ MacRuby/trunk/spec/macruby/core/gcd/source_spec.rb	2010-01-14 23:32:17 UTC (rev 3277)
@@ -222,7 +222,7 @@
         after :each do
           @src.cancel! if not @src.nil? and not @src.cancelled?
           @q.sync { }
-          @file.close
+          @file.close if not @file.closed?
           File.delete(@filename)
         end
       

Modified: MacRuby/trunk/spec/macruby/tags/macruby/core/gcd/source_tags.txt
===================================================================
--- MacRuby/trunk/spec/macruby/tags/macruby/core/gcd/source_tags.txt	2010-01-14 23:32:15 UTC (rev 3276)
+++ MacRuby/trunk/spec/macruby/tags/macruby/core/gcd/source_tags.txt	2010-01-14 23:32:17 UTC (rev 3277)
@@ -1,3 +0,0 @@
-fails:Dispatch::Source of type file: READ does close file when cancelled given IO
-fails:Dispatch::Source of type file: WRITE does close file when cancelled given IO
-fails:Dispatch::Source of type file: VNODE does close file when cancelled given IO
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100114/b7be25b0/attachment.html>


More information about the macruby-changes mailing list