[macruby-changes] [4058] MacRuby/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Mon May 10 15:30:03 PDT 2010
Revision: 4058
http://trac.macosforge.org/projects/ruby/changeset/4058
Author: martinlagardette at apple.com
Date: 2010-05-10 15:30:02 -0700 (Mon, 10 May 2010)
Log Message:
-----------
Some spec cleanup
- Deleting working kernel tags
- Implementing Kernel#<=>
Modified Paths:
--------------
MacRuby/trunk/object.c
MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/comparison_tags.txt
MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/methods_tags.txt
MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/open_tags.txt
MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/require_tags.txt
Removed Paths:
-------------
MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/fail_tags.txt
MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/lambda_tags.txt
MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/proc_tags.txt
MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/send_tags.txt
MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/sprintf_tags.txt
Modified: MacRuby/trunk/object.c
===================================================================
--- MacRuby/trunk/object.c 2010-05-10 18:46:09 UTC (rev 4057)
+++ MacRuby/trunk/object.c 2010-05-10 22:30:02 UTC (rev 4058)
@@ -1490,7 +1490,15 @@
return RTEST(result) ? Qfalse : Qtrue;
}
+static VALUE
+rb_obj_cmp(VALUE obj1, SEL sel, VALUE obj2)
+{
+ if (obj1 == obj2 || rb_obj_equal(obj1, 0, obj2))
+ return INT2FIX(0);
+ return Qnil;
+}
+
/***********************************************************************
*
* Document-class: Module
@@ -3008,6 +3016,7 @@
rb_objc_define_method(rb_mKernel, "=~", rb_obj_match, 1);
rb_objc_define_method(rb_mKernel, "!~", rb_obj_not_match, 1);
rb_objc_define_method(rb_mKernel, "eql?", rb_obj_equal, 1);
+ rb_objc_define_method(rb_mKernel, "<=>", rb_obj_cmp, 1);
rb_objc_define_method(rb_cNSObject, "clone", rb_obj_clone_imp, 0);
rb_objc_define_method(rb_cNSObject, "dup", rb_nsobj_dup, 0);
Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/comparison_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/comparison_tags.txt 2010-05-10 18:46:09 UTC (rev 4057)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/comparison_tags.txt 2010-05-10 22:30:02 UTC (rev 4058)
@@ -1,5 +1,2 @@
-fails:Kernel#<=> returns 0 if self
fails:Kernel#<=> returns 0 if self is == to the argument
-fails:Kernel#<=> returns nil if self is eql? but not == to the argument
fails:Kernel#<=> returns nil if self.==(arg) returns nil
-fails:Kernel#<=> returns nil if self is not == to the argument
Deleted: MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/fail_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/fail_tags.txt 2010-05-10 18:46:09 UTC (rev 4057)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/fail_tags.txt 2010-05-10 22:30:02 UTC (rev 4058)
@@ -1 +0,0 @@
-fails:Kernel.fail raises a RuntimeError
Deleted: MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/lambda_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/lambda_tags.txt 2010-05-10 18:46:09 UTC (rev 4057)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/lambda_tags.txt 2010-05-10 22:30:02 UTC (rev 4058)
@@ -1,4 +0,0 @@
-critical:Kernel.lambda returns from block into caller block
-fails:Kernel.lambda raises an ArgumentError when given too many arguments
-fails:Kernel.lambda raises an ArgumentError when given too few arguments
-fails:Kernel.lambda returns from block into caller block
Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/methods_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/methods_tags.txt 2010-05-10 18:46:09 UTC (rev 4057)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/methods_tags.txt 2010-05-10 22:30:02 UTC (rev 4058)
@@ -1,6 +1,3 @@
-fails:Kernel#methods doesn't pick up methods added inside 'class << self; private'
-fails:Kernel#methods returns a list of the names of publicly accessible methods in the object
-fails:Kernel#methods does not include any .undef'd methods
fails:Kernel#methods returns the publicly accessible methods of the object
fails:Kernel#methods does not return undefined singleton methods defined by obj.meth
fails:Kernel#methods does not return superclass methods undefined in the object's class
Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/open_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/open_tags.txt 2010-05-10 18:46:09 UTC (rev 4057)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/open_tags.txt 2010-05-10 22:30:02 UTC (rev 4058)
@@ -1,3 +1 @@
fails:Kernel#open calls #to_open on argument
-fails:Kernel#open opens an io when path starts with a pipe
-fails:Kernel#open opens an io when called with a block
Deleted: MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/proc_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/proc_tags.txt 2010-05-10 18:46:09 UTC (rev 4057)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/proc_tags.txt 2010-05-10 22:30:02 UTC (rev 4058)
@@ -1,3 +0,0 @@
-critical:Kernel.proc returns from block into caller block
-fails:Kernel.proc raises an ArgumentError when given too many arguments
-fails:Kernel.proc raises an ArgumentError when given too few arguments
Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/require_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/require_tags.txt 2010-05-10 18:46:09 UTC (rev 4057)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/require_tags.txt 2010-05-10 22:30:02 UTC (rev 4058)
@@ -1,11 +1,3 @@
-fails:Shell expansion in Kernel#require expands a preceding ~/ to the user's home directory for building the path to search
-fails:Shell expansion in Kernel#require adds the path to $LOADED_FEATURES
-fails:Kernel#require loads a .rb from an absolute path and returns true
-fails:Kernel#require bases the filename in $LOADED_FEATURES on the path given, not just basename
-fails:Kernel#require will not load the same file twice, returns false instead
-fails:Kernel#require checks $LOADED_FEATURES to see whether file is already loaded
-fails:Kernel#require canonicalizes relative paths
-fails:Kernel#require performs tilde expansion before storing paths in $LOADED_FEATURES
fails:Kernel#require does not resolve completely unqualified filenames against the current working directory unless it appears in $LOAD_PATH
fails:Kernel#require (path resolution) raises a TypeError if passed an object that has #to_path but not #to_str
fails:Kernel#require ($LOAD_FEATURES) does not load a ./ relative path that is already stored
Deleted: MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/send_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/send_tags.txt 2010-05-10 18:46:09 UTC (rev 4057)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/send_tags.txt 2010-05-10 22:30:02 UTC (rev 4058)
@@ -1 +0,0 @@
-fails:Kernel#send raises an ArgumentError if called with fewer arguments than required parameters
Deleted: MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/sprintf_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/sprintf_tags.txt 2010-05-10 18:46:09 UTC (rev 4057)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/sprintf_tags.txt 2010-05-10 22:30:02 UTC (rev 4058)
@@ -1,2 +0,0 @@
-fails:Kernel#sprintf treats nil arguments as zero-width strings in %s slots
-fails:Kernel#sprintf treats nil arguments as zeroes in %d slots
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100510/a644aaf8/attachment-0001.html>
More information about the macruby-changes
mailing list