[macruby-changes] [5007] MacRuby/trunk/io.c
source_changes at macosforge.org
source_changes at macosforge.org
Thu Dec 9 15:14:43 PST 2010
Revision: 5007
http://trac.macosforge.org/projects/ruby/changeset/5007
Author: lsansonetti at apple.com
Date: 2010-12-09 15:14:40 -0800 (Thu, 09 Dec 2010)
Log Message:
-----------
IO.new: don't raise a warning in case a block is passed
Modified Paths:
--------------
MacRuby/trunk/io.c
Modified: MacRuby/trunk/io.c
===================================================================
--- MacRuby/trunk/io.c 2010-12-09 05:57:20 UTC (rev 5006)
+++ MacRuby/trunk/io.c 2010-12-09 23:14:40 UTC (rev 5007)
@@ -2399,12 +2399,12 @@
*
*/
-static VALUE rb_io_s_new(VALUE klass, SEL sel, int argc, VALUE *argv);
+static VALUE rb_io_s_new0(VALUE klass, int argc, VALUE *argv);
static VALUE
rb_io_s_open(VALUE klass, SEL sel, int argc, VALUE *argv)
{
- VALUE io = rb_io_s_new(klass, sel, argc, argv);
+ VALUE io = rb_io_s_new0(klass, argc, argv);
if (rb_block_given_p()) {
VALUE ret = rb_vm_yield(1, &io);
rb_io_close(io);
@@ -3201,6 +3201,12 @@
*/
static VALUE
+rb_io_s_new0(VALUE klass, int argc, VALUE *argv)
+{
+ return rb_class_new_instance(argc, argv, klass);
+}
+
+static VALUE
rb_io_s_new(VALUE klass, SEL sel, int argc, VALUE *argv)
{
if (rb_block_given_p()) {
@@ -3220,7 +3226,7 @@
cname, cname);
}
}
- return rb_class_new_instance(argc, argv, klass);
+ return rb_io_s_new0(klass, argc, argv);
}
static inline void
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101209/b34fcb39/attachment.html>
More information about the macruby-changes
mailing list