ruby-lint
ruby-lint copied to clipboard
Don't crash on "class << A; self; end"
Fixing this makes it possible to analyze bundler-1.12.6
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.