Skip to content

Commit 57a5cec

Browse files
committed
Handle "#{}" as dynamic string
Before this commit, RDoc detects dynamic string with only "#" inside string literal. So "#" is handled as dynamic string. This commit fixes the behavior. When "#{" is contained in a string, it is handled as dynamic string.
1 parent 20af2f6 commit 57a5cec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rdoc/ruby_lex.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1225,8 +1225,8 @@ def identify_string(ltype, quoted = ltype, type = nil)
12251225
break
12261226
elsif @ltype != "'" && @ltype != "]" && @ltype != ":" and ch == "#"
12271227
ch = getc
1228-
subtype = true
12291228
if ch == "{" then
1229+
subtype = true
12301230
str << ch << skip_inner_expression
12311231
next
12321232
else

0 commit comments

Comments
 (0)