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

----------------------------------------
Bug #13971: Ripper changes sexp - class methods
https://bugs.ruby-lang.org/issues/13971

* Author: MSP-Greg (Greg L)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.0dev (2017-10-04 trunk 60116) [x64-mingw32]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
nobu, thank you for the fixes. I apologize; I missed some in the 1st report.

Code:

```ruby
# frozen_string_literal: true

require 'ripper'
require 'pp'

puts "\n#{RUBY_DESCRIPTION}"

puts         "\nmodule T ; def self.test(w) w ; end ; end"
pp Ripper.sexp('module T ; def self.test(w) w ; end ; end')

puts         "\nmodule T ; def self.<<(w) w ; end ; end"
pp Ripper.sexp('module T ; def self.<<(w) w ; end ; end')

puts         "\nmodule T ; class << self ; def test(w) w ; end ; end ; end"
pp Ripper.sexp('module T ; class << self ; def test(w) w ; end ; end ; end')

puts         "\nmodule T ; class << self ; def <<(w) w ; end ; end ; end"
pp Ripper.sexp('module T ; class << self ; def <<(w) w ; end ; end ; end')
```

Distinction as to 'self':

```
svn 60116
[:var_ref, :self]

svn 60101
[:var_ref, [:@kw, "self", [1, 15]]]
```

I'm finding these by running YARD, which uses Ripper for both its parsing and code highlighting.  I know RDoc is/has changed over to using Ripper for parsing.

Hence, I'm not sure if these are expected 'breaking' changes or things that are not picked up in current Ripper tests...

Full output in attached files for 60101 and 60116.

---Files--------------------------------
60116.txt (1.92 KB)
60101.txt (1.99 KB)


-- 
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>