So - what you've got there is a local variable named "reverser" and a method named "reverser" (which is going to "shadow" the reverser local)
Your code is never executing.
So - what you want to do is ... take the result of the yield and do the reverse operation on that. (Leaving aside how bizarre that requirement is for a moment.)
def reverser
string = yield
# ... all of your reverser code ...
end
Now circling back around - that's a bizarre way to use a block. A block is for passing additional execution to a method, not for passing argument to it. So if you wanted to say, have a callback executed for each character in reverser (in reverse?) that would be the proper use of yield.
Besides, Ruby already has a String#reverse
method - so the easiest possible thing to do to get your tests to pass is something like.
def reverser
(yield).split(/\b/).map(&:reverse).join
end