1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[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

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}"