Created
April 27, 2009 21:00
-
-
Save lenary/102731 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
# Arrays | |
['a', 'b', 'c'] # Without interpolation | |
["a", "b", "c"] # With interpolation | |
%w(a b c) # Without interpolation | |
%W(a b c) # With interpolation | |
# Strings | |
'a' # Without interpolation | |
"a" # With interpolation and backslashes | |
`a` # Command Interpretation with interpolation and backslashes | |
%q(a) # Without interpolation | |
%Q(a) # With interpolation and backslashes | |
%(a) # With interpolation and backslashes | |
%x(a) # Command Interpretation with interpolation and backslashes | |
# Symbols | |
:a # without interpolation | |
:'a' # without interpolation | |
:"a" # with interpolation | |
%s(a) # with interpolation | |
# Regexes | |
/a/ # normal use | |
%r(a) # can replace () with any character or {} pair | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment