Method: RDoc::Markup::Parser#setup_scanner
- Defined in:
- lib/rdoc/markup/parser.rb
#setup_scanner(input) ⇒ Object
Creates the StringScanner
427 428 429 430 431 432 433 434 435 436 437 438 |
# File 'lib/rdoc/markup/parser.rb', line 427 def setup_scanner input @line = 0 @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 |