[macruby-changes] [983] MacRuby/branches/experimental/process.c

source_changes at macosforge.org source_changes at macosforge.org
Wed Mar 18 12:34:39 PDT 2009


Revision: 983
          http://trac.macosforge.org/projects/ruby/changeset/983
Author:   lsansonetti at apple.com
Date:     2009-03-18 12:34:39 -0700 (Wed, 18 Mar 2009)
Log Message:
-----------
ported Process.times

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

Modified: MacRuby/branches/experimental/process.c
===================================================================
--- MacRuby/branches/experimental/process.c	2009-03-18 07:36:36 UTC (rev 982)
+++ MacRuby/branches/experimental/process.c	2009-03-18 19:34:39 UTC (rev 983)
@@ -5035,8 +5035,8 @@
  *     [ t.utime, t.stime ]   #=> [0.0, 0.02]
  */
 
-VALUE
-rb_proc_times(VALUE obj)
+static VALUE
+rb_proc_times(VALUE obj, SEL sel)
 {
 #if defined(HAVE_TIMES) && !defined(__CHECKER__)
     const double hertz =
@@ -5226,7 +5226,7 @@
 
     rb_define_module_function(rb_mProcess, "daemon", proc_daemon, -1);
 
-    rb_define_module_function(rb_mProcess, "times", rb_proc_times, 0);
+    rb_objc_define_method(*(VALUE *)rb_mProcess, "times", rb_proc_times, 0);
 
 #if defined(HAVE_TIMES) || defined(_WIN32)
     rb_cProcessTms = rb_struct_define("Tms", "utime", "stime", "cutime", "cstime", NULL);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090318/c3a93245/attachment-0001.html>


More information about the macruby-changes mailing list