block_given? always returns false
<p>So I am trying to write the method_missing in Ruby, the method_missing has three parameter as shown </p>

<pre><code>def method_missing(mId,*args,&amp;block)
     if (args.empty? &amp;&amp; !block_given?)
          puts " Sample One  No arguments were given nor block"
      elsif (!args.entries.empty?)
          puts " there was arguments given"
      elsif (block_given?)
           puts "there was ?code given"
    end 
end 
</code></pre>

<p>The problem calling instance.anything { " block" } always returns <strong>" Sample One  No arguments were given nor block"</strong>. 
it's clear that block_given always returns <strong>false</strong> , but why?</p>