[macruby-changes] [5147] MacRuby/trunk/object.c
source_changes at macosforge.org
source_changes at macosforge.org
Sun Jan 9 22:53:34 PST 2011
Revision: 5147
http://trac.macosforge.org/projects/ruby/changeset/5147
Author: watson1978 at gmail.com
Date: 2011-01-09 22:53:29 -0800 (Sun, 09 Jan 2011)
Log Message:
-----------
(Basic)Object#new will be passed the variable-length argument.
Test Script:
{{{
require 'test/unit/assertions.rb'
include Test::Unit::Assertions
assert_nothing_raised{ Object.new("hello") }
assert_nothing_raised{ Object.new(0, 1, 2, 3, 4, 5, 6, 7, 8, 9) }
assert_nothing_raised{ BasicObject.new("hello") }
assert_nothing_raised{ BasicObject.new(0, 1, 2, 3, 4, 5, 6, 7, 8, 9) }
puts :ok
}}}
Modified Paths:
--------------
MacRuby/trunk/object.c
Modified: MacRuby/trunk/object.c
===================================================================
--- MacRuby/trunk/object.c 2011-01-10 05:02:10 UTC (rev 5146)
+++ MacRuby/trunk/object.c 2011-01-10 06:53:29 UTC (rev 5147)
@@ -2982,14 +2982,14 @@
rb_objc_define_direct_method(*(VALUE *)rb_cNSObject, "new:", rb_class_new_instance_imp, -1);
- rb_objc_define_private_method(rb_cNSObject, "initialize", rb_obj_dummy, 0);
+ rb_objc_define_private_method(rb_cNSObject, "initialize", rb_obj_dummy, -1);
rb_objc_define_method(rb_cRubyObject, "==", rb_obj_equal, 1);
rb_objc_define_method(rb_cNSObject, "equal?", rb_obj_equal, 1);
rb_objc_define_method(rb_cNSObject, "==", rb_nsobj_equal, 1);
rb_objc_define_method(rb_cNSObject, "!", rb_obj_not, 0);
rb_objc_define_method(rb_cNSObject, "!=", rb_obj_not_equal, 1);
- rb_objc_define_private_method(rb_cBasicObject, "initialize", rb_obj_dummy, 0);
+ rb_objc_define_private_method(rb_cBasicObject, "initialize", rb_obj_dummy, -1);
rb_objc_define_method(rb_cBasicObject, "==", rb_obj_equal, 1);
rb_objc_define_method(rb_cBasicObject, "equal?", rb_obj_equal, 1);
rb_objc_define_method(rb_cBasicObject, "!", rb_obj_not, 0);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20110109/4f20d22a/attachment.html>
More information about the macruby-changes
mailing list