Skip to content
This repository was archived by the owner on Mar 16, 2023. It is now read-only.

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

Open
mvidner wants to merge 3 commits intoyorickpeterse:masterfrom
mvidner:self-in-sclass
Open

Don't crash on "class << A; self; end" #200
mvidner wants to merge 3 commits intoyorickpeterse:masterfrom
mvidner:self-in-sclass

Conversation

@mvidner
Copy link
Copy Markdown
Contributor

@mvidner mvidner commented Nov 13, 2016

Fixing this makes it possible to analyze bundler-1.12.6

@mvidner
Copy link
Copy Markdown
Contributor Author

mvidner commented Nov 13, 2016

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant