Skip to content

fix: reject abstract singleton methods on interfaces#30

Open
Saithej2k wants to merge 1 commit into
Shopify:mainfrom
Saithej2k:fix/interface-abstract-singleton-methods
Open

fix: reject abstract singleton methods on interfaces#30
Saithej2k wants to merge 1 commit into
Shopify:mainfrom
Saithej2k:fix/interface-abstract-singleton-methods

Conversation

@Saithej2k

Copy link
Copy Markdown

Summary

  • Reject abstract singleton method declarations on interfaces
  • Cover both abstract def self.foo and class << self; abstract def foo; end forms
  • Remove the just-defined singleton method stub before raising

Closes #5

Validation

  • git diff --check

Not run locally: test suite requires Ruby 3.4.3; the local system Ruby is 2.6.10.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enforce that abstract methods aren't defined on an interface's singleton class

1 participant