-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use non deprecated method name #19
Conversation
In prompt.rb:40 use Pry#input_ring vice Pry#input_array, which is being deprecated as per pry/pry#1814
Cool. Thanks for the PR @mathisto. What would happen if the user is locked in an old version of |
@mathisto believe we can work on top of what we already have here. What if we check if the object respond to |
The newest version of pry renames the history array to ring. This selectively responds to the newest version of the method.
lib/jazz_fingers/prompt.rb
Outdated
@@ -37,7 +37,9 @@ def name | |||
end | |||
|
|||
def line_number(pry) | |||
"[#{bold_text(pry.input_array.size)}]" | |||
pry.respond_to? :input_ring ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/LiteralAsCondition: Literal :input_ring appeared as a condition.
Style/MultilineTernaryOperator: Avoid multi-line ternary operators, use if or unless instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok Hound, I'll bow to your demands.
Great call with |
Taking the hounds advice. Multi-line ternaries are apparently frowned upon.
LGTM! Thanks for bearing with me on this! |
In prompt.rb:40 use Pry#input_ring vice Pry#input_array, which is being deprecated as per pry/pry#1814