[macruby-changes] [992] MacRuby/branches/experimental/io.c
source_changes at macosforge.org
source_changes at macosforge.org
Thu Mar 19 07:56:05 PDT 2009
Revision: 992
http://trac.macosforge.org/projects/ruby/changeset/992
Author: pthomson at apple.com
Date: 2009-03-19 07:56:04 -0700 (Thu, 19 Mar 2009)
Log Message:
-----------
Added Object#inspect.
Modified Paths:
--------------
MacRuby/branches/experimental/io.c
Modified: MacRuby/branches/experimental/io.c
===================================================================
--- MacRuby/branches/experimental/io.c 2009-03-19 05:40:05 UTC (rev 991)
+++ MacRuby/branches/experimental/io.c 2009-03-19 14:56:04 UTC (rev 992)
@@ -2333,11 +2333,16 @@
*
* 1cat456
*/
+
+// TODO: The output doesn't match the documentation here; why is that?
static VALUE
rb_obj_display(VALUE self, SEL sel, int argc, VALUE *argv)
{
-rb_notimplement();
+ VALUE port;
+ rb_scan_args(argc, argv, "01", &port);
+ if(NIL_P(port)) port = rb_stdout;
+ return rb_io_write(port, 0, self);
}
// static void
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090319/117f96c6/attachment.html>
More information about the macruby-changes
mailing list