title: how to execute multiple statements within a ruby code block
body: <p>I have the following simplified code example:</p>
  
  <pre><code>class MyTimerClass
      def timed_execution(&amp;block)
          ...
      end
      def elapsed_time
          ...
          return ...
      end
  end
  
  ...
  t = MyTimerClass.new
  t.timed_execution {1000.times {"foo".equal? "foo"}} 
  puts "block took #{t.elapsed_time} seconds to run."
  </code></pre>
  
  <p>What I want to do is print out "executed" on every execution of <code>"foo".equal? "foo"</code>. Instead of putting this inside the <code>timed_execution</code> method I want to add it to the passed code block. something like...</p>
  
  <pre><code>t.timed_execution {1000.times {"foo".equal? "foo" puts "executed"}}
  </code></pre>
  
  <p>which is wrong. I guess what I really want to know is how to have multiple statements within a code block. Really simple question I know...</p>