Sourav wrote:
> In C1, aMethod was private, but in C2 it became public... so this way,
> any private method of a class can be converted to public methods. So
> then what is the use of having them (private methods) in the first
> place at all! In C++, there is a rule that, an object (data or
> function) of lower access-specifier can be upgraded to higher
> acc-specifier but the reverse is not true. Should it not also be
> implemented in Ruby?

Hi there,

In ruby they are more like hints. If the programmer wants to make a
method public, then the assumption is that they know what they are
doing.

You could make it harder on them (and yourself) to make something
public again by overriding the Class#public method:

class Class
  def public(*methods)
    warn "You naughty programmer, that's private!"
  end
end

But I wouldn't recommend doing it.

Regards,
Jordan