Actions
Bug #13971
closedRipper changes sexp - class methods
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.0dev (2017-10-04 trunk 60116) [x64-mingw32]
Backport:
Description
nobu, thank you for the fixes. I apologize; I missed some in the 1st report.
Code:
# 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
Actions
Like0
Like0