title: Undefined method for main:Object (NoMethodError) though method is defined
body: <p>I have defined a script with the following code snippet:</p>
  
  <pre><code>check_params param
  
  def check_params(param)
   # some code
  end
  </code></pre>
  
  <p>When I run this I get</p>
  
  <blockquote>
    <p>undefined method `check_params' for main:Object (NoMethodError)</p>
  </blockquote>