Skip to content

Commit

Permalink
[DOC] Fix an error example
Browse files Browse the repository at this point in the history
`%q{c}` after another string literal is parsed as RHS of modulo, `q`
method call with a block.
  • Loading branch information
nobu committed Jan 7, 2025
1 parent be4567e commit e9593eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/syntax/literals.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e9593eb

Please sign in to comment.