You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When inspecting an endless range (introduced in Ruby 2.6), everything works until typing ( or o. Then the user input is simply written on top of the view.
Steps to recreate:
load irb
require'scryglass'(1..).scry
(optional) confirm scryglass is otherwise working fine - try sending begin or end via c, or returning the object with return, or quitting with q
input o or (
try doing anything
The workaround if one finds themself in this situation is to background the irb session ctrl+z and kill the process with kill.
Possible solutions
Lock the Ruby dependency to < 2.6
Check for endless ranges before listing the elements. This can be done by checking begin and end - if either are nil, you have an infinite range on your hands (ruby 2.7 introduces begin-less ranges, iirc). Then simply implement lazy rendering. Or just tell the user "this is infinite! feel free to send methods with c, but you cannot see all elements"
The text was updated successfully, but these errors were encountered:
When inspecting an endless range (introduced in Ruby 2.6), everything works until typing
(
oro
. Then the user input is simply written on top of the view.Steps to recreate:
irb
begin
orend
viac
, or returning the object with return, or quitting withq
o
or(
The workaround if one finds themself in this situation is to background the irb session
ctrl+z
and kill the process withkill
.Possible solutions
< 2.6
begin
andend
- if either arenil
, you have an infinite range on your hands (ruby 2.7 introduces begin-less ranges, iirc). Thensimplyimplement lazy rendering. Or just tell the user "this is infinite! feel free to send methods withc
, but you cannot see all elements"The text was updated successfully, but these errors were encountered: