Skip to content

Instantly share code, notes, and snippets.

@tubbo
Created December 11, 2012 20:52
Show Gist options
  • Select an option

  • Save tubbo/4262024 to your computer and use it in GitHub Desktop.

Select an option

Save tubbo/4262024 to your computer and use it in GitHub Desktop.
play that record backwards
def reverser(&block)
words = yield
words.reverse
end
describe "reverser" do
it "reverses the string returned by the default block" do
reverser { "hello" }.should == "olleh"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment