This commit is contained in:
BurdetteLamar 2024-09-01 17:49:01 +01:00 коммит произвёл Peter Zhu
Родитель 5df574d26e
Коммит 07a0aa9be6
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -212,7 +212,7 @@ Method Regexp.escape returns an escaped string:
=== Source Literals
The source literal largely behaves like a double-quoted string;
see {String Literals}[rdoc-ref:syntax/literals.rdoc@String+Literals].
see {Double-Quoted String Literals}[rdoc-ref:syntax/literals.rdoc@Double-Quoted+String+Literals].
In particular, a source literal may contain interpolated expressions:
@ -1050,7 +1050,7 @@ Example:
re.match('TEst') # => #<MatchData "TEst">
re.match('TEST') # => nil
re.match('teST') # => nil
re = /t(?i:e)st/
re.match('test') # => #<MatchData "test">
re.match('tEst') # => #<MatchData "tEst">

Просмотреть файл

@ -178,7 +178,7 @@ sequences are as follows:
The last one, <tt>\<newline></tt>, represents an empty string instead of a character.
It is used to fold a line in a string.
=== Double-quoted \String Literals
=== Double-Quoted \String Literals
The most common way of writing strings is using <tt>"</tt>:
@ -213,7 +213,7 @@ See also:
* {% and %Q: Interpolable String Literals}[#label-25+and+-25Q-3A+Interpolable+String+Literals]
=== Single-quoted \String Literals
=== Single-Quoted \String Literals
Interpolation may be disabled by escaping the "#" character or using
single-quoted strings: