public
Description: Ruby module exclusion functionality
Clone URL: git://github.com/yrashk/rbmodexcl.git
Search Repo:
#unextend fix
yrashk (author)
Wed Apr 30 19:27:33 -0700 2008
commit  5445dba58fd7f033ef3a2f7dc6c973f796c8f1ab
tree    ff20fe4dfbde3a8f2d67b858ed4ebca73e908bd0
parent  949eb1d42b2a2ce5ccd32c08c3e354a1ac8cfc07
...
22
23
24
25
 
26
27
28
...
22
23
24
 
25
26
27
28
0
@@ -22,7 +22,7 @@
0
           rb_raise(rb_eArgError, "unextending Kernel is prohibited");
0
         
0
         
0
- p = (TYPE(self) == T_CLASS) ? self : rb_singleton_class(self);
0
+ p = rb_singleton_class(self);
0
         
0
         while (p) {
0
             if (p == mod || RCLASS(p)->m_tbl == RCLASS(mod)->m_tbl) {
...
19
20
21
 
 
 
 
 
22
23
24
...
19
20
21
22
23
24
25
26
27
28
29
0
@@ -19,6 +19,11 @@
0
     @klass.should_not respond_to(:modded?)
0
   end
0
   
0
+ it "should call Module.unextended on #unextend" do
0
+ @module.should_receive(:unextended).with(@klass)
0
+ @klass.unextend(@module)
0
+ end
0
+
0
 end
0
 
0
 

Comments

    No one has commented yet.