public
Description: RSpec-style specification for the Ruby programming language
Homepage: http://rubyspec.org
Clone URL: git://github.com/brixen/rubyspec.git
module_function should return self even with args
zenspider (author)
Tue May 13 22:25:05 -0700 2008
commit  68b51a512dcca1e853a98f648957775b8ee7c060
tree    67e4251a21c7f82c5770a52e5b15cd4553e3e1c3
parent  17f9fd5878ff7c224c6fdff63aa25f4b4093f277
...
16
17
18
 
 
 
 
 
 
 
 
 
 
19
20
21
...
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
0
@@ -16,6 +16,16 @@ describe "Module#module_function with specific method names" do
0
     m.respond_to?(:test3).should == false
0
   end
0
 
0
+ it "returns the current module" do
0
+ x = nil
0
+ m = Module.new do
0
+ def test() end
0
+ x = module_function :test
0
+ end
0
+
0
+ x.should == m
0
+ end
0
+
0
   it "creates an independent copy of the method, not a redirect" do
0
     module Mixin
0
       def test

Comments

    No one has commented yet.