[macruby-changes] [1615] MacRuby/branches/experimental/io.c
source_changes at macosforge.org
source_changes at macosforge.org
Wed May 27 14:10:11 PDT 2009
Revision: 1615
http://trac.macosforge.org/projects/ruby/changeset/1615
Author: lsansonetti at apple.com
Date: 2009-05-27 14:10:10 -0700 (Wed, 27 May 2009)
Log Message:
-----------
added IO#bytes
Modified Paths:
--------------
MacRuby/branches/experimental/io.c
Modified: MacRuby/branches/experimental/io.c
===================================================================
--- MacRuby/branches/experimental/io.c 2009-05-27 21:01:38 UTC (rev 1614)
+++ MacRuby/branches/experimental/io.c 2009-05-27 21:10:10 UTC (rev 1615)
@@ -1447,10 +1447,12 @@
* f.bytes.sort #=> [101, 104, 108, 108, 111]
*/
+static SEL sel_each_byte = 0;
+
static VALUE
rb_io_bytes(VALUE io, SEL sel)
{
-rb_notimplement();
+ return rb_enumeratorize(io, sel_each_byte, 0, NULL);
}
/*
@@ -4104,4 +4106,6 @@
rb_file_const("NOCTTY", INT2FIX(O_NOCTTY));
rb_file_const("BINARY", INT2FIX(0));
rb_file_const("SYNC", INT2FIX(O_SYNC));
+
+ sel_each_byte = sel_registerName("each_byte");
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090527/808d732c/attachment.html>
More information about the macruby-changes
mailing list