Skip to content

Conversation

@st0012
Copy link
Member

@st0012 st0012 commented Jan 10, 2023

First 2 commits' argument defaults are not necessary because all of their callers specify the argument's value.
Given that these methods are only used within IRB, I feel leaving these defaults could be misleading.

The last commit is a similar cleanup by making one caller generating tokens beforehand.

These methods are always called with tokens specified. So their default
`@tokens` value is never used and is misleading.
Copy link
Collaborator

@hasumikin hasumikin left a comment

Choose a reason for hiding this comment

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

LGTM👍

@st0012 st0012 merged commit bfe9915 into master Jan 12, 2023
@st0012 st0012 deleted the refactor-lexer branch January 12, 2023 10:30
matzbot pushed a commit to ruby/ruby that referenced this pull request Jan 12, 2023
methods
(ruby/irb#502)

* Remove unnecessary parameter defaults

These methods are always called with tokens specified. So their default
`@tokens` value is never used and is misleading.

* Remove unnecessary context default

* Require tokens for `RubyLex#check_state`
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.

3 participants