summaryrefslogtreecommitdiff
path: root/lib/rdoc/token_stream.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/token_stream.rb')
-rw-r--r--lib/rdoc/token_stream.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/rdoc/token_stream.rb b/lib/rdoc/token_stream.rb
index f428e2400c..19ca7ed248 100644
--- a/lib/rdoc/token_stream.rb
+++ b/lib/rdoc/token_stream.rb
@@ -112,8 +112,7 @@ module RDoc::TokenStream
# Returns a string representation of the token stream
def tokens_to_s
- token_stream.compact.map { |token| token[:text] }.join ''
+ (token_stream or return '').compact.map { |token| token[:text] }.join ''
end
end
-