summaryrefslogtreecommitdiff
path: root/doc/syntax/literals.rdoc
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2020-09-29 14:39:21 +0900
committerYusuke Endoh <mame@ruby-lang.org>2020-09-29 14:39:52 +0900
commit2e947bc181794d1bcf26d700b2c2c15b53c45b36 (patch)
tree3006bf5d33497e32b8814dd98eb9edc23cffbde7 /doc/syntax/literals.rdoc
parenta9ff39087092b21059fca046ace9ca87770692a4 (diff)
doc/syntax/literals.rdoc: explain `#@foo` and `#$foo`
Diffstat (limited to 'doc/syntax/literals.rdoc')
-rw-r--r--doc/syntax/literals.rdoc3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/syntax/literals.rdoc b/doc/syntax/literals.rdoc
index e58430e96f..c871d2780d 100644
--- a/doc/syntax/literals.rdoc
+++ b/doc/syntax/literals.rdoc
@@ -143,6 +143,9 @@ Double-quote strings allow interpolation of other values using
Any expression may be placed inside the interpolated section, but it's best to
keep the expression small for readability.
+You can also use <tt>#@foo</tt> and <tt>#$foo</tt> as a shorthand for,
+respentively, <tt>#{ @foo }</tt> and <tt>#{ $foo }</tt>.
+
Interpolation may be disabled by escaping the "#" character or using
single-quote strings: