Issue #14597 has been reported by MSP-Greg (Greg L).

----------------------------------------
Bug #14597: Ripper Issue - introduced between 62674 & 62681
https://bugs.ruby-lang.org/issues/14597

* Author: MSP-Greg (Greg L)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.0dev (2018-03-07 trunk 62681) [x64-mingw32]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
The following code generates a Ripper FATAL stop.  62674 is okay, but 62681 errors.  Possibly #62675 parse.y: tSPACE for old bison?

```
require 'ripper'
str = '* The \ must be doubled if not followed by white space: \\.'
tokens = Ripper::Lexer.new(str).lex  # Error here
puts tokens.inspect 
```

I don't know whether this is considered a bug.  YARD uses Ripper for both parsing rb files and also for syntax highlighting of any indented comment block.  This is part of a comment block contained in `lib/rdoc/markup.rb`.

This has parsed without error for quite a long time on my doc site, https://msp-greg.github.io/, which contains Ruby, AWS, Rails, and a few other items.  I mention it just because it probably contains quite a few indented comment blocks that are not ruby code.

Or, said another way, I can see how Ripper should not be expected to never error on arbitrary strings passed to it, but it has done so for quite a bit of content for quite a long time...

Sorry for the delay in posting, and thanks, Greg




-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>