-
Notifications
You must be signed in to change notification settings - Fork 119
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
Require Reline 0.3.6 or higher #632
Conversation
With the new Reline requirement, I think we can also drop these conditions:
|
@st0012 Sorry, there was a change in |
They are 3 |
"Multi-line multibyte regular expression raises exception" (ruby#627) is fixed in Reline 0.3.6.
111460f
to
fa2998a
Compare
Thank you! I removed it. |
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.
👍
(ruby/irb#632) * Require Reline 0.3.6 or higher "Multi-line multibyte regular expression raises exception" (ruby/irb#627) is fixed in Reline 0.3.6. * Remove unnecessary conditional
@@ -398,7 +396,7 @@ def auto_indent(&block) | |||
mod_key = RUBY_PLATFORM.match?(/darwin/) ? "Option" : "Alt" | |||
message = "Press #{mod_key}+d to read the full document" | |||
contents = [message] + doc.accept(formatter).split("\n") | |||
contents = contents.take(Reline.preferred_dialog_height) if Reline.respond_to?(:preferred_dialog_height) |
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.
I believe the removal of this check has broken IRB's autocomplete for me. I'm getting an error saying undefined method
preferred_dialog_height' for Reline:Module`.
~/Code/springboard $ irb
irb(main):001:0> select/Users/brianmcgue/.gem/gems/irb-1.7.2/lib/irb/input-method.rb:399:in `block in <class:RelineInputMethod>': undefined method `preferred_dialog_height' for Reline:Module (NoMethodError)
select █
contents = contents.take(Reline.preferred_dialog_height)
^^^^^^^^^^^^^^^^^^^^^^^^
from /Users/brianmcgue/.gem/gems/reline-0.3.6/lib/reline/line_editor.rb:588:in `instance_exec'
from /Users/brianmcgue/.gem/gems/reline-0.3.6/lib/reline/line_editor.rb:588:in `call'
from /Users/brianmcgue/.gem/gems/reline-0.3.6/lib/reline/line_editor.rb:623:in `call'
from /Users/brianmcgue/.gem/gems/reline-0.3.6/lib/reline/line_editor.rb:776:in `update_each_dialog'
from /Users/brianmcgue/.gem/gems/reline-0.3.6/lib/reline/line_editor.rb:652:in `block in render_dialog'
from /Users/brianmcgue/.gem/gems/reline-0.3.6/lib/reline/line_editor.rb:650:in `map'
from /Users/brianmcgue/.gem/gems/reline-0.3.6/lib/reline/line_editor.rb:650:in `render_dialog'
from /Users/brianmcgue/.gem/gems/reline-0.3.6/lib/reline/line_editor.rb:500:in `rerender'
from /Users/brianmcgue/.gem/gems/reline-0.3.6/lib/reline.rb:356:in `block (3 levels) in inner_readline'
from /Users/brianmcgue/.gem/gems/reline-0.3.6/lib/reline.rb:354:in `each'
from /Users/brianmcgue/.gem/gems/reline-0.3.6/lib/reline.rb:354:in `block (2 levels) in inner_readline'
from /Users/brianmcgue/.gem/gems/reline-0.3.6/lib/reline.rb:429:in `block in read_io'
from /Users/brianmcgue/.gem/gems/reline-0.3.6/lib/reline.rb:399:in `loop'
from /Users/brianmcgue/.gem/gems/reline-0.3.6/lib/reline.rb:399:in `read_io'
from /Users/brianmcgue/.gem/gems/reline-0.3.6/lib/reline.rb:352:in `block in inner_readline'
from /Users/brianmcgue/.gem/gems/reline-0.3.6/lib/reline.rb:350:in `loop'
from /Users/brianmcgue/.gem/gems/reline-0.3.6/lib/reline.rb:350:in `inner_readline'
from /Users/brianmcgue/.gem/gems/reline-0.3.6/lib/reline.rb:278:in `block in readmultiline'
from /Users/brianmcgue/.gem/gems/reline-0.3.6/lib/reline/ansi.rb:149:in `block in with_raw_input'
from /Users/brianmcgue/.gem/gems/reline-0.3.6/lib/reline/ansi.rb:149:in `raw'
from /Users/brianmcgue/.gem/gems/reline-0.3.6/lib/reline/ansi.rb:149:in `with_raw_input'
from /Users/brianmcgue/.gem/gems/reline-0.3.6/lib/reline.rb:274:in `readmultiline'
from /Users/brianmcgue/.rbenv/versions/3.2.0/lib/ruby/3.2.0/forwardable.rb:240:in `readmultiline'
from /Users/brianmcgue/.gem/gems/irb-1.7.2/lib/irb/input-method.rb:413:in `gets'
from /Users/brianmcgue/.gem/gems/irb-1.7.2/lib/irb.rb:540:in `block (2 levels) in eval_input'
from /Users/brianmcgue/.gem/gems/irb-1.7.2/lib/irb.rb:764:in `signal_status'
from /Users/brianmcgue/.gem/gems/irb-1.7.2/lib/irb.rb:539:in `block in eval_input'
from /Users/brianmcgue/.gem/gems/irb-1.7.2/lib/irb/ruby-lex.rb:220:in `readmultiline'
from /Users/brianmcgue/.gem/gems/irb-1.7.2/lib/irb/ruby-lex.rb:246:in `block in each_top_level_statement'
from /Users/brianmcgue/.gem/gems/irb-1.7.2/lib/irb/ruby-lex.rb:245:in `loop'
from /Users/brianmcgue/.gem/gems/irb-1.7.2/lib/irb/ruby-lex.rb:245:in `each_top_level_statement'
from /Users/brianmcgue/.gem/gems/irb-1.7.2/lib/irb.rb:558:in `eval_input'
from /Users/brianmcgue/.gem/gems/irb-1.7.2/lib/irb.rb:494:in `block in run'
from /Users/brianmcgue/.gem/gems/irb-1.7.2/lib/irb.rb:493:in `catch'
from /Users/brianmcgue/.gem/gems/irb-1.7.2/lib/irb.rb:493:in `run'
from /Users/brianmcgue/.gem/gems/irb-1.7.2/lib/irb.rb:416:in `start'
from /Users/brianmcgue/.gem/gems/irb-1.7.2/exe/irb:9:in `<top (required)>'
from /Users/brianmcgue/.gem/bin/irb:25:in `load'
from /Users/brianmcgue/.gem/bin/irb:25:in `<main>'
This is confirmed if I reopen IRB:
irb(main):001:0> Reline.respond_to?(:preferred_dialog_height)
=> false
My apologies if this isn't the way correct manner to bring up issues. Would you like me to create an issue in the repo?
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.
Sorry for the trouble, the issue has been addressed in #638
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.
Sorry, I should have checked the issues first!
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.
No worries. Thanks for raising the issue!
Because "Multi-line multibyte regular expression raises exception" (#627) is fixed in Reline 0.3.6.
ref: ruby/reline#562