Skip to content

Commit 72e5ee4

Browse files
committed
Fix postfix if/unless/while/until after heredoc
The postfix if/unless/while/until are detected by what @lex_state is :EXPR_END. So sets :EXPR_END on @lex_state when TkHEREDOCBEG is created.
1 parent e752c73 commit 72e5ee4

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
@@ -1132,7 +1132,7 @@ def identify_here_document(op)
11321132
indent: indent,
11331133
started: false
11341134
}
1135-
@lex_state = :EXPR_BEG
1135+
@lex_state = :EXPR_END
11361136
Token(RDoc::RubyLex::TkHEREDOCBEG, start_token)
11371137
end
11381138

0 commit comments

Comments
 (0)