James Hunt wrote:
> On 9/9/07, 7stud -- <dolgun / excite.com> wrote:
>> class MyClass
>> (NoMethodError)
>>
>> So, I'm not seeing any difference.
>> --
>> Posted via http://www.ruby-forum.com/.
>>
>>
> 
> If you look at my code, the MyClass definition creates an instance
> method called hello that calls the private greet method.  In the
> Explicit example, greet just doesn't exist in MyExplicitClass after
> the mixin...

As far as I can tell, your private hello method is irrelevant since you 
never call the hello method:

> MyExplicitModule.greet
> MyExplicitClass.new.greet

If I add the hello method to my last example that uses module_function, 
I get the same output:

module MyModule
    def greet
        puts "hello"
    end

    module_function :greet
end

class MyClass
    include MyModule

    def hello
        greet
    end
end

MyModule.greet
MyClass.new.greet

--output:--
hello
r1test.rb:18: private method `greet' called for #<MyClass:0x25350> 
(NoMethodError)



-- 
Posted via http://www.ruby-forum.com/.