[macruby-changes] [3166] MacRuby/trunk

source_changes at macosforge.org source_changes at macosforge.org
Wed Dec 23 13:42:22 PST 2009


Revision: 3166
          http://trac.macosforge.org/projects/ruby/changeset/3166
Author:   ernest.prabhakar at gmail.com
Date:     2009-12-23 13:42:21 -0800 (Wed, 23 Dec 2009)
Log Message:
-----------
Removed debug from gcd.d, updated Source spec and tags

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	2009-12-23 21:33:07 UTC (rev 3165)
+++ MacRuby/trunk/gcd.c	2009-12-23 21:42:21 UTC (rev 3166)
@@ -753,7 +753,6 @@
         NUM2UINT(handle), NUM2LONG(mask), RQueue(queue)->queue);
 
     if (rb_block_given_p()) {
-        fprintf(stderr, "Setting event handler for %p\n", (void*) src);
         rb_source_on_event(self, 0);
     } else {
         rb_raise(rb_eArgError, "No event handler for Dispatch::Source.");
@@ -806,10 +805,8 @@
     rb_source_t *src = RSource(self);
     rb_vm_block_t *block = given_block();
     GC_WB(&src->event_handler, block);
-    fprintf(stderr, "Setting context for %p to %p\n", (void*) src->source, (void*) self);
     GC_RETAIN(self);
     dispatch_set_context(src->source, (void *)self); // retain this?
-    fprintf(stderr, "Set context for %p\n", src);
     dispatch_source_set_event_handler_f(src->source, rb_source_event_handler);
     return Qnil;
 }

Modified: MacRuby/trunk/spec/macruby/core/gcd/source_spec.rb
===================================================================
--- MacRuby/trunk/spec/macruby/core/gcd/source_spec.rb	2009-12-23 21:33:07 UTC (rev 3165)
+++ MacRuby/trunk/spec/macruby/core/gcd/source_spec.rb	2009-12-23 21:42:21 UTC (rev 3166)
@@ -36,6 +36,18 @@
         @q = Dispatch::Queue.new('org.macruby.gcd_spec.sources')
       end
 
+      describe :DATA_ADD do
+        before :each do
+          @type = Dispatch::Source::DATA_ADD
+        end
+
+        it "returns an instance of Dispatch::Source" do
+          p @type
+          src = Dispatch::Source.new(@type, 1, 2, @q) { true.should == true }
+          p src
+          src.should be_kind_of(Dispatch::Source)
+        end
+      end
     end
     
   end

Modified: MacRuby/trunk/spec/macruby/tags/macruby/core/gcd/source_tags.txt
===================================================================
--- MacRuby/trunk/spec/macruby/tags/macruby/core/gcd/source_tags.txt	2009-12-23 21:33:07 UTC (rev 3165)
+++ MacRuby/trunk/spec/macruby/tags/macruby/core/gcd/source_tags.txt	2009-12-23 21:42:21 UTC (rev 3166)
@@ -0,0 +1,2 @@
+fails:Dispatch::Source of type DATA_ADD returns an instance of Dispatch::Source
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091223/7b761559/attachment.html>


More information about the macruby-changes mailing list