зеркало из https://github.com/github/ruby.git
[ruby/reline] Only show dialogs if default external encoding is UTF-8
Fixes a crash in IRB if a dialog is displayed and the default external encoding is not UTF-8: /home/jeremy/tmp/reline/lib/reline/line_editor.rb:731:in `write': U+2588 from UTF-8 to US-ASCII (Encoding::UndefinedConversionError) https://github.com/ruby/reline/commit/f570525ecd
This commit is contained in:
Родитель
1251edd1db
Коммит
eb4682b3c6
|
@ -624,6 +624,7 @@ class Reline::LineEditor
|
|||
|
||||
DIALOG_DEFAULT_HEIGHT = 20
|
||||
private def render_dialog(cursor_column)
|
||||
return unless Encoding.default_external == Encoding::UTF_8
|
||||
@dialogs.each do |dialog|
|
||||
render_each_dialog(dialog, cursor_column)
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче