aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/ruby_lex.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/ruby_lex.rb')
-rw-r--r--lib/rdoc/ruby_lex.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/rdoc/ruby_lex.rb b/lib/rdoc/ruby_lex.rb
index 7e84a4ad8e..e4f2445438 100644
--- a/lib/rdoc/ruby_lex.rb
+++ b/lib/rdoc/ruby_lex.rb
@@ -401,13 +401,15 @@ class RDoc::RubyLex
|op, io|
@ltype = "="
res = ''
- until (ch = getc) == "\n" do res << ch end
+ nil until (ch = getc) == "\n"
+
until peek_equal?("=end") && peek(4) =~ /\s/ do
until (ch = getc) == "\n" do res << ch end
end
- res << gets
+ gets # consume =end
+
@ltype = nil
- Token(TkRD_COMMENT, res)
+ Token(TkCOMMENT, res)
end
@OP.def_rule("\n") do |op, io|