Created
January 13, 2013 16:15
-
-
Save mkeen/4524882 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# current behavior | |
def my_string arg | |
s = "string" | |
["stuff", "to", "add"].each do |item| | |
s << " " | |
s << item | |
end | |
s | |
end | |
# i want to write | |
def my_string arg > s | |
= "my string" | |
["stuff", "to", "add"].each do |item| | |
<< " " | |
<< item | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment