diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-18 21:10:47 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-18 21:10:47 +0000 |
commit | fb725b03699e7193d7112370e58a7de5e28c1f17 (patch) | |
tree | 7a09f8601e7fb8b85452fc7a85c46c524a3a609f /lib/rdoc/parser | |
parent | 769aaa9d68acc99cc61672c616673b050f43848f (diff) | |
download | ruby-fb725b03699e7193d7112370e58a7de5e28c1f17.tar.gz ruby-fb725b03699e7193d7112370e58a7de5e28c1f17.tar.xz ruby-fb725b03699e7193d7112370e58a7de5e28c1f17.zip |
Import RDoc r104. Various test fixes.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/parser')
-rw-r--r-- | lib/rdoc/parser/ruby.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/rdoc/parser/ruby.rb b/lib/rdoc/parser/ruby.rb index e00d727f9..26757256a 100644 --- a/lib/rdoc/parser/ruby.rb +++ b/lib/rdoc/parser/ruby.rb @@ -540,8 +540,10 @@ class RDoc::RubyLex begin tk = @OP.match(self) @space_seen = TkSPACE === tk - rescue SyntaxError - abort if @exception_on_syntax_error + rescue SyntaxError => e + raise RDoc::Error, "syntax error: #{e.message}" if + @exception_on_syntax_error + tk = TkError.new(line_no, char_no) end end while @skip_space and TkSPACE === tk |