title: Calling a private method xxx using self.xxx() from within another private method resulting in error "private method `xxx' called"
body: <p>I'm trying to get a good Ruby coding style. To prevent accidently calling a local variable with the same name, I'm always using <code>self.</code> where appropriate. But now I stumbled over this:</p>
  
  <pre><code>class MyClass &lt; ActiveRecord::Base
    before_validation :sanitize_user_data
  
    private
  
    def sanitize_user_data
      self.sanitize_name # with ".self" it's a problem, without it's not!
    end
  
    def sanitize_name
      unless self.name.nil?
        self.name.gsub!(/\s+/, ' ')
        self.name.strip!
      end
    end
  end
  </code></pre>
  
  <p>The above code results in an error</p>
  
  <blockquote>
    <p>private method <code>sanitize_name</code> called</p>
  </blockquote>
  
  <p>but when removing <code>self.</code> and just using <code>sanitize_name</code>, it works. Why's that?</p>