Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
3
Task/Literals-String/Ruby/literals-string-1.rb
Normal file
3
Task/Literals-String/Ruby/literals-string-1.rb
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
'single quotes with \'embedded quote\' and \\backslash'
|
||||
%q(not interpolating with (nested) parentheses
|
||||
and newline)
|
||||
4
Task/Literals-String/Ruby/literals-string-2.rb
Normal file
4
Task/Literals-String/Ruby/literals-string-2.rb
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
a = 42
|
||||
"double quotes with \"embedded quote\"\nnewline and variable interpolation: #{a} % 10 = #{a % 10}"
|
||||
%Q(same as above)
|
||||
%|same as above|
|
||||
10
Task/Literals-String/Ruby/literals-string-3.rb
Normal file
10
Task/Literals-String/Ruby/literals-string-3.rb
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
print <<HERE
|
||||
With an unquoted delimiter, this interpolates:
|
||||
a = #{a}
|
||||
HERE
|
||||
print <<-INDENTED
|
||||
This delimiter can have whitespace before it
|
||||
INDENTED
|
||||
print <<'NON_INTERPOLATING'
|
||||
This will not interpolate: #{a}
|
||||
NON_INTERPOLATING
|
||||
Loading…
Add table
Add a link
Reference in a new issue