[macruby-changes] [2714] MacRuby/trunk/spec/frozen
source_changes at macosforge.org
source_changes at macosforge.org
Sun Oct 4 14:46:08 PDT 2009
Revision: 2714
http://trac.macosforge.org/projects/ruby/changeset/2714
Author: eloy.de.enige at gmail.com
Date: 2009-10-04 14:46:08 -0700 (Sun, 04 Oct 2009)
Log Message:
-----------
Tagged critical examples and disabled a few UnboundMethod specs.
When the disabled UnboundMethod specs are ran together a SecurityError is
raised from mspec/lib/runner/mspec.rb:266 File.exists? Haven't been able to
reproduce this yet outside of running these specs.
Modified Paths:
--------------
MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/define_singleton_method_tags.txt
MacRuby/trunk/spec/frozen/tags/macruby/core/method/eql_tags.txt
MacRuby/trunk/spec/frozen/tags/macruby/core/method/equal_value_tags.txt
MacRuby/trunk/spec/frozen/tags/macruby/core/module/define_method_tags.txt
MacRuby/trunk/spec/frozen/tags/macruby/core/unboundmethod/bind_tags.txt
Added Paths:
-----------
MacRuby/trunk/spec/frozen/core/unboundmethod/bind_spec_disabled.rb
MacRuby/trunk/spec/frozen/core/unboundmethod/clone_spec_disabled.rb
MacRuby/trunk/spec/frozen/tags/macruby/core/struct/hash_tags.txt
Removed Paths:
-------------
MacRuby/trunk/spec/frozen/core/unboundmethod/bind_spec.rb
MacRuby/trunk/spec/frozen/core/unboundmethod/clone_spec.rb
Deleted: MacRuby/trunk/spec/frozen/core/unboundmethod/bind_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/unboundmethod/bind_spec.rb 2009-10-04 21:45:47 UTC (rev 2713)
+++ MacRuby/trunk/spec/frozen/core/unboundmethod/bind_spec.rb 2009-10-04 21:46:08 UTC (rev 2714)
@@ -1,57 +0,0 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
-
-describe "UnboundMethod#bind" do
- before :each do
- @normal_um = UnboundMethodSpecs::Methods.new.method(:foo).unbind
- @parent_um = UnboundMethodSpecs::Parent.new.method(:foo).unbind
- @child1_um = UnboundMethodSpecs::Child1.new.method(:foo).unbind
- @child2_um = UnboundMethodSpecs::Child2.new.method(:foo).unbind
- end
-
- it "raises TypeError if object is not kind_of? the Module the method defined in" do
- lambda { @normal_um.bind(UnboundMethodSpecs::B.new) }.should raise_error(TypeError)
- end
-
- it "returns Method for any object that is kind_of? the Module method was extracted from" do
- @normal_um.bind(UnboundMethodSpecs::Methods.new).class.should == Method
- end
-
- deviates_on :rubinius do
- it "returns Method for any object kind_of? the Module the method is defined in" do
- @parent_um.bind(UnboundMethodSpecs::Child1.new).class.should == Method
- @child1_um.bind(UnboundMethodSpecs::Parent.new).class.should == Method
- @child2_um.bind(UnboundMethodSpecs::Child1.new).class.should == Method
- end
- end
-
- it "Method returned for obj is equal to one directly returned by obj.method" do
- obj = UnboundMethodSpecs::Methods.new
- @normal_um.bind(obj).should == obj.method(:foo)
- end
-
- it "returns a callable method" do
- obj = UnboundMethodSpecs::Methods.new
- @normal_um.bind(obj).call.should == obj.foo
- end
-
- ruby_bug "redmine:2117", "1.8.7" do
- it "binds a Parent's class method to any Child's class methods" do
- m = UnboundMethodSpecs::Parent.method(:class_method).unbind.bind(UnboundMethodSpecs::Child1)
- m.should be_an_instance_of(Method)
- m.call.should == "I am UnboundMethodSpecs::Child1"
- end
-
- it "will raise when binding a an object singleton's method to another object" do
- other = UnboundMethodSpecs::Parent.new
- p = UnboundMethodSpecs::Parent.new
- class << p
- def singleton_method
- :single
- end
- end
- um = p.method(:singleton_method).unbind
- lambda{ um.bind(other) }.should raise_error(TypeError)
- end
- end
-end
Copied: MacRuby/trunk/spec/frozen/core/unboundmethod/bind_spec_disabled.rb (from rev 2713, MacRuby/trunk/spec/frozen/core/unboundmethod/bind_spec.rb)
===================================================================
--- MacRuby/trunk/spec/frozen/core/unboundmethod/bind_spec_disabled.rb (rev 0)
+++ MacRuby/trunk/spec/frozen/core/unboundmethod/bind_spec_disabled.rb 2009-10-04 21:46:08 UTC (rev 2714)
@@ -0,0 +1,57 @@
+require File.dirname(__FILE__) + '/../../spec_helper'
+require File.dirname(__FILE__) + '/fixtures/classes'
+
+describe "UnboundMethod#bind" do
+ before :each do
+ @normal_um = UnboundMethodSpecs::Methods.new.method(:foo).unbind
+ @parent_um = UnboundMethodSpecs::Parent.new.method(:foo).unbind
+ @child1_um = UnboundMethodSpecs::Child1.new.method(:foo).unbind
+ @child2_um = UnboundMethodSpecs::Child2.new.method(:foo).unbind
+ end
+
+ it "raises TypeError if object is not kind_of? the Module the method defined in" do
+ lambda { @normal_um.bind(UnboundMethodSpecs::B.new) }.should raise_error(TypeError)
+ end
+
+ it "returns Method for any object that is kind_of? the Module method was extracted from" do
+ @normal_um.bind(UnboundMethodSpecs::Methods.new).class.should == Method
+ end
+
+ deviates_on :rubinius do
+ it "returns Method for any object kind_of? the Module the method is defined in" do
+ @parent_um.bind(UnboundMethodSpecs::Child1.new).class.should == Method
+ @child1_um.bind(UnboundMethodSpecs::Parent.new).class.should == Method
+ @child2_um.bind(UnboundMethodSpecs::Child1.new).class.should == Method
+ end
+ end
+
+ it "Method returned for obj is equal to one directly returned by obj.method" do
+ obj = UnboundMethodSpecs::Methods.new
+ @normal_um.bind(obj).should == obj.method(:foo)
+ end
+
+ it "returns a callable method" do
+ obj = UnboundMethodSpecs::Methods.new
+ @normal_um.bind(obj).call.should == obj.foo
+ end
+
+ ruby_bug "redmine:2117", "1.8.7" do
+ it "binds a Parent's class method to any Child's class methods" do
+ m = UnboundMethodSpecs::Parent.method(:class_method).unbind.bind(UnboundMethodSpecs::Child1)
+ m.should be_an_instance_of(Method)
+ m.call.should == "I am UnboundMethodSpecs::Child1"
+ end
+
+ it "will raise when binding a an object singleton's method to another object" do
+ other = UnboundMethodSpecs::Parent.new
+ p = UnboundMethodSpecs::Parent.new
+ class << p
+ def singleton_method
+ :single
+ end
+ end
+ um = p.method(:singleton_method).unbind
+ lambda{ um.bind(other) }.should raise_error(TypeError)
+ end
+ end
+end
Deleted: MacRuby/trunk/spec/frozen/core/unboundmethod/clone_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/unboundmethod/clone_spec.rb 2009-10-04 21:45:47 UTC (rev 2713)
+++ MacRuby/trunk/spec/frozen/core/unboundmethod/clone_spec.rb 2009-10-04 21:46:08 UTC (rev 2714)
@@ -1,12 +0,0 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
-
-describe "UnboundMethod#clone" do
- it "returns a copy of the UnboundMethod" do
- um1 = UnboundMethodSpecs::Methods.instance_method(:foo)
- um2 = um1.clone
-
- (um1 == um2).should == true
- um1.bind(UnboundMethodSpecs::Methods.new).call.should == um2.bind(UnboundMethodSpecs::Methods.new).call
- end
-end
Copied: MacRuby/trunk/spec/frozen/core/unboundmethod/clone_spec_disabled.rb (from rev 2713, MacRuby/trunk/spec/frozen/core/unboundmethod/clone_spec.rb)
===================================================================
--- MacRuby/trunk/spec/frozen/core/unboundmethod/clone_spec_disabled.rb (rev 0)
+++ MacRuby/trunk/spec/frozen/core/unboundmethod/clone_spec_disabled.rb 2009-10-04 21:46:08 UTC (rev 2714)
@@ -0,0 +1,12 @@
+require File.dirname(__FILE__) + '/../../spec_helper'
+require File.dirname(__FILE__) + '/fixtures/classes'
+
+describe "UnboundMethod#clone" do
+ it "returns a copy of the UnboundMethod" do
+ um1 = UnboundMethodSpecs::Methods.instance_method(:foo)
+ um2 = um1.clone
+
+ (um1 == um2).should == true
+ um1.bind(UnboundMethodSpecs::Methods.new).call.should == um2.bind(UnboundMethodSpecs::Methods.new).call
+ end
+end
Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/define_singleton_method_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/define_singleton_method_tags.txt 2009-10-04 21:45:47 UTC (rev 2713)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/kernel/define_singleton_method_tags.txt 2009-10-04 21:46:08 UTC (rev 2714)
@@ -1,2 +1,4 @@
critical:Kernel#define_singleton_method when given an UnboundMethod correctly calls the new method
critical:Kernel#define_singleton_method when given an UnboundMethod adds the new method to the methods list
+critical:Kernel#define_singleton_method when given an UnboundMethod defines any Child class method from any Parent's class methods
+critical:Kernel#define_singleton_method when given an UnboundMethod will raise when attempting to define an object's singleton method from another objetc's singleton method
Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/method/eql_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/method/eql_tags.txt 2009-10-04 21:45:47 UTC (rev 2713)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/method/eql_tags.txt 2009-10-04 21:46:08 UTC (rev 2714)
@@ -1 +1,2 @@
+critical:Method#eql? returns true if the two core methods are aliases
critical:Method#eql? returns true if the two methods are alises of each other in C
Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/method/equal_value_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/method/equal_value_tags.txt 2009-10-04 21:45:47 UTC (rev 2713)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/method/equal_value_tags.txt 2009-10-04 21:46:08 UTC (rev 2714)
@@ -1 +1,2 @@
+critical:Method#== returns true if the two core methods are aliases
critical:Method#== returns true if the two methods are alises of each other in C
Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/module/define_method_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/module/define_method_tags.txt 2009-10-04 21:45:47 UTC (rev 2713)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/module/define_method_tags.txt 2009-10-04 21:46:08 UTC (rev 2714)
@@ -1,3 +1,4 @@
+critical:Module#define_method accepts a Method (still bound)
fails:Module#define_method when given an UnboundMethod correctly passes given arguments to the new method
fails:Module#define_method when given an UnboundMethod adds the new method to the methods list
fails:Module#define_method defines the given method as an instance method with the given name in self
Added: MacRuby/trunk/spec/frozen/tags/macruby/core/struct/hash_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/struct/hash_tags.txt (rev 0)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/struct/hash_tags.txt 2009-10-04 21:46:08 UTC (rev 2714)
@@ -0,0 +1 @@
+critical:Struct#hash returns the same hash for recursive structs
Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/unboundmethod/bind_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/unboundmethod/bind_tags.txt 2009-10-04 21:45:47 UTC (rev 2713)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/unboundmethod/bind_tags.txt 2009-10-04 21:46:08 UTC (rev 2714)
@@ -1 +1 @@
-critical:UnboundMethod#bind returns a callable method
\ No newline at end of file
+critical:UnboundMethod#bind returns a callable method
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091004/da53643f/attachment-0001.html>
More information about the macruby-changes
mailing list