Forum: Ruby Object private methods

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
84793a49de73453438021b705bb9a9e4?d=identicon&s=25 Ves Pasian (vespasian)
on 2008-12-01 21:54
Consider the following,


class X
end

X.private_methods == Object.private_methods. Since X implicitly extends
Object, then how does X inherit Object's private methods, since the
documentation states that Subclasses inherit non-private methods only?

TIA,
ves
703fbc991fd63e0e1db54dca9ea31b53?d=identicon&s=25 Robert Dober (Guest)
on 2008-12-01 22:32
(Received via mailing list)
On Mon, Dec 1, 2008 at 9:48 PM, Ves Pasian <keepitsimple222@yahoo.com>
wrote:
> Consider the following,
>
>
> class X
> end
>
> X.private_methods == Object.private_methods. Since X implicitly extends
> Object, then how does X inherit Object's private methods, since the
> documentation states that Subclasses inherit non-private methods only?
Does it? Any pointers? Well it is clearly incorrect.

Cheers
R.
This topic is locked and can not be replied to.