Created
March 11, 2010 16:09
-
-
Save chrisbloom7/329281 to your computer and use it in GitHub Desktop.
The hardest thing for me to grok in Ruby
This file contains hidden or 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
| colors = ["red"] #=> ["red"] | |
| colors_2 = colors #=> ["red"] | |
| colors_2 << "blue" #=> ["red", "blue"] | |
| colors #=> ["red", "blue"] | |
| def add_white (original_colors) | |
| original_colors << "white" | |
| end | |
| add_white colors #=> ["red", "blue", "white"] | |
| colors_2 #=> ["red", "blue", "white"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.