[ruby/rdoc] Early return when token_stream
is nil
https://github.com/ruby/rdoc/commit/04f75d8516 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
This commit is contained in:
parent
cda431f538
commit
56ccad060d
@ -112,7 +112,7 @@ module RDoc::TokenStream
|
||||
# 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user