Project

General

Profile

Bug #13971

Ripper changes sexp - class methods

Added by MSP-Greg (Greg L) about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.0dev (2017-10-04 trunk 60116) [x64-mingw32]
[ruby-core:83106]

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

60116.txt (1.92 KB) 60116.txt MSP-Greg (Greg L), 10/04/2017 03:18 PM
60101.txt (1.99 KB) 60101.txt MSP-Greg (Greg L), 10/04/2017 03:18 PM
#1

Updated by nobu (Nobuyoshi Nakada) about 3 years ago

  • Status changed from Open to Closed

Applied in changeset trunk|r60120.


parse.y: fix KWD2EID

  • parse.y (KWD2EID): should respect the previous callback result for keywords. [ruby-core:83106] [Bug #13971]

Also available in: Atom PDF