diff --git a/lib/rdoc/token_stream.rb b/lib/rdoc/token_stream.rb index ea8d9417cc..19ca7ed248 100644 --- a/lib/rdoc/token_stream.rb +++ b/lib/rdoc/token_stream.rb @@ -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