Skip to content

Conversation

@KaanOzkan
Copy link
Contributor

@KaanOzkan KaanOzkan commented Nov 4, 2024

Motivation

Based on @kddnewton's suggestion in #2060 (comment) 🙇

Implementation

Tests

Existing

@KaanOzkan KaanOzkan added the enhancement New feature or request label Nov 4, 2024
@KaanOzkan KaanOzkan marked this pull request as ready for review November 4, 2024 21:37
@KaanOzkan KaanOzkan requested a review from a team as a code owner November 4, 2024 21:37
sig { params(name: String).returns(T::Boolean) }
def valid_method_name?(name)
Prism.parse("def self.#{name}(a); end").success?
Prism.parse_success?("def self.#{name}(a); end")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KaanOzkan KaanOzkan merged commit 7216831 into main Nov 5, 2024
@KaanOzkan KaanOzkan deleted the ko/parse-success branch November 5, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants