title: Why does ruby allow child classes access parent's private methods?
body: <pre><code>class Main
      def say_hello
          puts &quot;Hello&quot;
      end
      
      private
          def say_hi
              puts &quot;hi&quot;
          end
  end
  
  class SubMain &lt; Main
      def say_hello
          puts &quot;Testing #{say_hi}&quot;
      end
  
  end
  
  test = SubMain.new
  test.say_hello()    
  </code></pre>
  <p>OUTPUT:</p>
  <blockquote>
  <p>hi</p>
  <p>Testing</p>
  </blockquote>