1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Import RDoc 3.1

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2010-12-28 22:08:56 +00:00
parent 90d5bcf910
commit e2efe8e81d
28 changed files with 494 additions and 56 deletions

View file

@ -541,12 +541,12 @@ class RDoc::RubyLex
catch(:RET) do
if @lex_state == EXPR_ARG
if @space_seen and peek(0) =~ /[0-9]/
throw :RET, identify_number
throw :RET, identify_number(op)
else
@lex_state = EXPR_BEG
end
elsif @lex_state != EXPR_END and peek(0) =~ /[0-9]/
throw :RET, identify_number
throw :RET, identify_number(op)
else
@lex_state = EXPR_BEG
end
@ -1010,10 +1010,10 @@ class RDoc::RubyLex
identify_string(lt, @quoted)
end
def identify_number
def identify_number(op = "")
@lex_state = EXPR_END
num = ''
num = op
if peek(0) == "0" && peek(1) !~ /[.eE]/
num << getc