Skip to content

Commit e9593eb

Browse files
committed
[DOC] Fix an error example
`%q{c}` after another string literal is parsed as RHS of modulo, `q` method call with a block.
1 parent be4567e commit e9593eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/syntax/literals.rdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ Any combination of adjacent single-quote, double-quote, percent strings will
204204
be concatenated as long as a percent-string is not last.
205205

206206
%q{a} 'b' "c" #=> "abc"
207-
"a" 'b' %q{c} #=> NameError: uninitialized constant q
207+
"a" 'b' %q{c} #=> NoMethodError: undefined method 'q' for main
208208

209209
=== Character Literal
210210

0 commit comments

Comments
 (0)