We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Readline::HISTORY.delete_at(index)
Readline::HISTORY.delete_at method not working for indices of negative values.
irb require 'readline' Readline::HISTORY.push('a') => ["a"] Readline::HISTORY.push('b') => ["b"] Readline::HISTORY.push('c') => ["c"] >> Readline::HISTORY.delete_at(-1) /var/lib/gems/2.7.0/gems/rb-readline-0.5.5/lib/readline.rb:458:in `delete_at': undefined method `+' for nil:NilClass (NoMethodError)
def self.delete_at(index) if index < 0 i += RbReadline.history_length
i variable is not defined here, which I think is causing the problem. I guess it was meant to be index.
i
index
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Summary
Readline::HISTORY.delete_at method not working for indices of negative values.
Steps to Reproduce
Additional Information
i
variable is not defined here, which I think is causing the problem. I guess it was meant to beindex
.The text was updated successfully, but these errors were encountered: