[DOC] Fix an error example

`%q{c}` after another string literal is parsed as RHS of modulo, `q`
method call with a block.
This commit is contained in:
Nobuyoshi Nakada 2025-01-07 09:56:54 +09:00
parent be4567e194
commit e9593eb967
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465

View File

@ -204,7 +204,7 @@ Any combination of adjacent single-quote, double-quote, percent strings will
be concatenated as long as a percent-string is not last.
%q{a} 'b' "c" #=> "abc"
"a" 'b' %q{c} #=> NameError: uninitialized constant q
"a" 'b' %q{c} #=> NoMethodError: undefined method 'q' for main
=== Character Literal