Skip to content

Commit

Permalink
[ruby/rdoc] Early return when token_stream is nil
Browse files Browse the repository at this point in the history
ruby/rdoc@04f75d8516

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
  • Loading branch information
2 people authored and matzbot committed Dec 5, 2023
1 parent cda431f commit 56ccad0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rdoc/token_stream.rb
Expand Up @@ -112,7 +112,7 @@ def token_stream
# Returns a string representation of the token stream

def tokens_to_s
Array(token_stream).compact.map { |token| token[:text] }.join ''
(token_stream or return '').compact.map { |token| token[:text] }.join ''
end

end

0 comments on commit 56ccad0

Please sign in to comment.