summaryrefslogtreecommitdiff
path: root/lib/rdoc/ruby_lex.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-02 00:32:30 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-02 00:32:30 +0000
commitcc2a16d94d744d14d4a5eb06eca22137f8a9b79e (patch)
tree2907a20e2d9ae3a2831707056bb3fe2d384b066d /lib/rdoc/ruby_lex.rb
parent918f625a5eeba35b9b191cb39c1d634b4cc7efee (diff)
Import RDoc 3.5.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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|