Ruby default block and yield
<p>I am working on the following problem:</p>

<pre><code>describe "some silly block functions" do
  describe "reverser" do
    it "reverses the string returned by the default block" do
      result = reverser do
        "hello"
      end

      expect(result).to eq("olleh")
    end
</code></pre>

<p>From my understanding this should reverse a string. My code is as follows:</p>

<pre><code>def reverser
    yield "hello"
end

reverser do |i|
    puts i.reverse
end
</code></pre>

<p>This simply returns "hello". I may be missing some fundamental concepts here about how yield, blocks, and functions all interact. How do I going about doing what I am trying to accomplish?</p>