[macruby-changes] [2278] MacRuby/trunk

source_changes at macosforge.org source_changes at macosforge.org
Tue Aug 11 11:16:11 PDT 2009


Revision: 2278
          http://trac.macosforge.org/projects/ruby/changeset/2278
Author:   pthomson at apple.com
Date:     2009-08-11 11:16:11 -0700 (Tue, 11 Aug 2009)
Log Message:
-----------
Removing tags for specs that pass in Kernel; made Object#extend check that its parameter isn't frozen.

Modified Paths:
--------------
    MacRuby/trunk/eval.c
    MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/Array_tags.txt
    MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/Float_tags.txt
    MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/Integer_tags.txt
    MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/backtick_tags.txt
    MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/eval_tags.txt
    MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/fail_tags.txt
    MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/warn_tags.txt

Removed Paths:
-------------
    MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/extend_tags.txt

Modified: MacRuby/trunk/eval.c
===================================================================
--- MacRuby/trunk/eval.c	2009-08-11 18:16:09 UTC (rev 2277)
+++ MacRuby/trunk/eval.c	2009-08-11 18:16:11 UTC (rev 2278)
@@ -617,6 +617,11 @@
 static VALUE
 rb_obj_extend(VALUE obj, SEL sel, int argc, VALUE *argv)
 {
+	if(rb_obj_frozen_p(obj))
+	{
+		rb_raise(rb_eRuntimeError, "cannot extend a frozen object");
+	}
+	
     int i;
 
     if (argc == 0) {

Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/Array_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/Array_tags.txt	2009-08-11 18:16:09 UTC (rev 2277)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/Array_tags.txt	2009-08-11 18:16:11 UTC (rev 2278)
@@ -1,4 +1 @@
 fails:Kernel#Array is a private method
-fails:Kernel#Array tries to call #to_ary on the given argument if it's not an Array
-fails:Kernel#Array tries to call #to_a on the given argument if #to_ary is not provided
-fails:Kernel#Array raises a TypeError if #to_ary / #to_a do not return an array

Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/Float_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/Float_tags.txt	2009-08-11 18:16:09 UTC (rev 2277)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/Float_tags.txt	2009-08-11 18:16:11 UTC (rev 2278)
@@ -24,13 +24,3 @@
 critical:Kernel#Float raises an ArgumentError if there's a decimal point on the right side of the 'E'
 fails:Kernel.Float is a private method
 fails:Kernel#Float is a private method
-fails:Kernel.Float otherwise, converts the given argument to a Float by calling #to_f
-fails:Kernel.Float returns the identical NaN if to_f is called and it returns NaN
-fails:Kernel.Float returns the identical Infinity if to_f is called and it returns Infinity
-fails:Kernel.Float raises a TypeError if #to_f returns a String
-fails:Kernel.Float raises a TypeError if #to_f returns an Integer
-fails:Kernel#Float otherwise, converts the given argument to a Float by calling #to_f
-fails:Kernel#Float returns the identical NaN if to_f is called and it returns NaN
-fails:Kernel#Float returns the identical Infinity if to_f is called and it returns Infinity
-fails:Kernel#Float raises a TypeError if #to_f returns a String
-fails:Kernel#Float raises a TypeError if #to_f returns an Integer

Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/Integer_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/Integer_tags.txt	2009-08-11 18:16:09 UTC (rev 2277)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/Integer_tags.txt	2009-08-11 18:16:11 UTC (rev 2278)
@@ -8,21 +8,5 @@
 critical:Kernel#Integer raises an ArgumentError if the number cannot be parsed as decimal
 fails:Kernel.Integer is a private method
 fails:Kernel#Integer is a private method
-fails:Kernel.Integer calls to_i on Rationals
 fails:Kernel.Integer raises an ArgumentError if the String ends with a null byte
-fails:Kernel#Integer calls to_i on Rationals
 fails:Kernel#Integer raises an ArgumentError if the String ends with a null byte
-fails:Kernel.Integer uncritically return the value of to_int even if it is not an Integer
-fails:Kernel.Integer returns the value of to_int if the result is a Fixnum
-fails:Kernel.Integer returns the value of to_int if the result is a Bignum
-fails:Kernel.Integer calls to_i on an object whose to_int returns nil
-fails:Kernel.Integer uncritically return the value of to_int even if it is not an Integer
-fails:Kernel.Integer raises a TypeError if to_i returns a value that is not an Integer
-fails:Kernel.Integer raises a TypeError if to_int returns nil and no to_i exists
-fails:Kernel#Integer uncritically return the value of to_int even if it is not an Integer
-fails:Kernel#Integer returns the value of to_int if the result is a Fixnum
-fails:Kernel#Integer returns the value of to_int if the result is a Bignum
-fails:Kernel#Integer calls to_i on an object whose to_int returns nil
-fails:Kernel#Integer uncritically return the value of to_int even if it is not an Integer
-fails:Kernel#Integer raises a TypeError if to_i returns a value that is not an Integer
-fails:Kernel#Integer raises a TypeError if to_int returns nil and no to_i exists

Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/backtick_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/backtick_tags.txt	2009-08-11 18:16:09 UTC (rev 2277)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/backtick_tags.txt	2009-08-11 18:16:11 UTC (rev 2278)
@@ -1,3 +1,2 @@
 fails:Kernel#` is a private method
 fails:Kernel#` sets $? to the exit status of the executed sub-process
-fails:Kernel#` tries to convert the given argument to String using #to_str

Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/eval_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/eval_tags.txt	2009-08-11 18:16:09 UTC (rev 2277)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/eval_tags.txt	2009-08-11 18:16:11 UTC (rev 2278)
@@ -3,8 +3,5 @@
 fails:Kernel#eval evaluates within the scope of the eval
 fails:Kernel#eval evaluates such that consts are scoped to the class of the eval
 fails:Kernel#eval accepts a Proc object as a binding
-fails:Kernel#eval does not make Proc locals visible to evaluated code
-fails:Kernel#eval allows a binding to be captured inside an eval
-fails:Kernel#eval allows creating a new class in a binding
 fails:Kernel#eval uses the filename of the binding if none is provided
 fails:Kernel#eval can be aliased

Deleted: MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/extend_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/extend_tags.txt	2009-08-11 18:16:09 UTC (rev 2277)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/extend_tags.txt	2009-08-11 18:16:11 UTC (rev 2278)
@@ -1,2 +0,0 @@
-fails:Kernel#extend raises a TypeError if self is frozen
-fails:Kernel#extend raises a RuntimeError if self is frozen

Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/fail_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/fail_tags.txt	2009-08-11 18:16:09 UTC (rev 2277)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/fail_tags.txt	2009-08-11 18:16:11 UTC (rev 2278)
@@ -1,2 +1 @@
 fails:Kernel.fail is a private method
-fails:Kernel.fail raises a RuntimeError
\ No newline at end of file

Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/warn_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/warn_tags.txt	2009-08-11 18:16:09 UTC (rev 2277)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/warn_tags.txt	2009-08-11 18:16:11 UTC (rev 2278)
@@ -1,5 +1 @@
 fails:Kernel.warn is a private method
-fails:Kernel.warn calls #write on $stderr if $VERBOSE is true
-fails:Kernel.warn calls #write on $stderr if $VERBOSE is false
-fails:Kernel.warn does not call #write on $stderr if $VERBOSE is nil
-fails:Kernel.warn writes the default record separator and NOT $/ to $stderr after the warning message
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090811/acd78b80/attachment-0001.html>


More information about the macruby-changes mailing list