[ruby/reline] Suppress warning, "instance variable @ambiguous_width not initialized"

https://github.com/ruby/reline/commit/368f7e2f78
This commit is contained in:
aycabta 2021-10-11 16:21:50 +09:00 committed by git
parent b5f0e20936
commit 6f41cab704
1 changed files with 1 additions and 1 deletions

View File

@ -457,7 +457,7 @@ module Reline
private def may_req_ambiguous_char_width
@ambiguous_width = 2 if Reline::IOGate == Reline::GeneralIO or STDOUT.is_a?(File)
return if @ambiguous_width
return if defined? @ambiguous_width
Reline::IOGate.move_cursor_column(0)
begin
output.write "\u{25bd}"