[macruby-changes] [1168] MacRuby/branches/experimental/io.c

source_changes at macosforge.org source_changes at macosforge.org
Thu Mar 26 10:37:12 PDT 2009


Revision: 1168
          http://trac.macosforge.org/projects/ruby/changeset/1168
Author:   pthomson at apple.com
Date:     2009-03-26 10:37:09 -0700 (Thu, 26 Mar 2009)
Log Message:
-----------
Precommit; implemented rb_io_pid.

Modified Paths:
--------------
    MacRuby/branches/experimental/io.c

Modified: MacRuby/branches/experimental/io.c
===================================================================
--- MacRuby/branches/experimental/io.c	2009-03-26 13:33:03 UTC (rev 1167)
+++ MacRuby/branches/experimental/io.c	2009-03-26 17:37:09 UTC (rev 1168)
@@ -782,7 +782,8 @@
 static VALUE
 rb_io_pid(VALUE io, SEL sel)
 {
-    rb_notimplement();
+	rb_io_t *io_struct = ExtractIOStruct(io);
+	return ((io_struct->pid == -1) ? Qnil : INT2FIX(io_struct->pid));
 }
 
 
@@ -3059,7 +3060,7 @@
 static VALUE
 rb_io_s_pipe(VALUE recv, SEL sel, int argc, VALUE *argv)
 {
-rb_notimplement();
+	rb_notimplement();
 }
 
 /*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090326/9d7720dd/attachment.html>


More information about the macruby-changes mailing list