diff options
Diffstat (limited to 'lib/rdoc')
-rw-r--r-- | lib/rdoc/token_stream.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/rdoc/token_stream.rb b/lib/rdoc/token_stream.rb index dbe6c5ae85..f428e2400c 100644 --- a/lib/rdoc/token_stream.rb +++ b/lib/rdoc/token_stream.rb @@ -74,11 +74,16 @@ module RDoc::TokenStream ## # Adds +tokens+ to the collected tokens - def add_tokens(*tokens) - tokens.flatten.each { |token| @token_stream << token } + def add_tokens(tokens) + @token_stream.concat(tokens) end - alias add_token add_tokens + ## + # Adds one +token+ to the collected tokens + + def add_token(token) + @token_stream.push(token) + end ## # Starts collecting tokens |