diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-07 22:23:38 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-07 22:23:38 +0000 |
commit | ba6ae341bab83dfc7a624c5bf20d8d162dacaff9 (patch) | |
tree | 540581a54cefcdc817577f646f09372f7e9936d1 /lib/rdoc/markup | |
parent | bf51c067b92361007a57909c539591d3d00cdbd8 (diff) |
* lib/rdoc/*, test/rdoc/*: Update rdoc-5.0.0.beta2
Fixed ri parse defect with left-hand matched classes.
https://github.com/rdoc/rdoc/pull/420
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/markup')
-rw-r--r-- | lib/rdoc/markup/parser.rb | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/rdoc/markup/parser.rb b/lib/rdoc/markup/parser.rb index 2f8b7628e2..22cca20420 100644 --- a/lib/rdoc/markup/parser.rb +++ b/lib/rdoc/markup/parser.rb @@ -79,8 +79,6 @@ class RDoc::Markup::Parser @binary_input = nil @current_token = nil @debug = false - @have_encoding = Object.const_defined? :Encoding - @have_byteslice = ''.respond_to? :byteslice @input = nil @input_encoding = nil @line = 0 @@ -324,15 +322,7 @@ class RDoc::Markup::Parser # The character offset for the input string at the given +byte_offset+ def char_pos byte_offset - if @have_byteslice then - @input.byteslice(0, byte_offset).length - elsif @have_encoding then - matched = @binary_input[0, byte_offset] - matched.force_encoding @input_encoding - matched.length - else - byte_offset - end + @input.byteslice(0, byte_offset).length end ## @@ -430,11 +420,6 @@ class RDoc::Markup::Parser @line_pos = 0 @input = input.dup - if @have_encoding and not @have_byteslice then - @input_encoding = @input.encoding - @binary_input = @input.force_encoding Encoding::BINARY - end - @s = StringScanner.new input end @@ -556,4 +541,3 @@ class RDoc::Markup::Parser end end - |