Skip to content

Instantly share code, notes, and snippets.

@methodmissing
Created October 10, 2008 00:32
Show Gist options
  • Save methodmissing/15951 to your computer and use it in GitHub Desktop.
Save methodmissing/15951 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'activesupport'
z = returning( "" ) do |html|
html += "stuff"
html += "more stuff" if true
end
z = returning( [] ) do |html|
html << "stuff"
html << "more_stuff" if true
end.join("\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment