ruby-lint icon indicating copy to clipboard operation
ruby-lint copied to clipboard

Don't crash on "class << A; self; end"

Open mvidner opened this issue 9 years ago • 1 comments

Fixing this makes it possible to analyze bundler-1.12.6

mvidner avatar Nov 13 '16 21:11 mvidner

Note that the crash occurs only if the named class is not known. That is,

class A; end
class << A; self; end

would be processed just fine.

In the concrete case of bundler, the problematic source is

        source_index_class = (class << Gem::SourceIndex; self; end)

which concerns an older version of rubygems that is not described in ruby-lint/definitions.

mvidner avatar Nov 13 '16 22:11 mvidner