summaryrefslogtreecommitdiff
path: root/lib/reline.rb
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-10-11 16:21:50 +0900
committergit <svn-admin@ruby-lang.org>2021-10-11 16:24:45 +0900
commit6f41cab704d1b3dd44910e0e943dceebde6fcb1a (patch)
treee5ad583bab8a70829e0803f3b3a41be397a76308 /lib/reline.rb
parentb5f0e209362bd62f9d1b2258eeff9649ef051b61 (diff)
[ruby/reline] Suppress warning, "instance variable @ambiguous_width not initialized"
https://github.com/ruby/reline/commit/368f7e2f78
Diffstat (limited to 'lib/reline.rb')
-rw-r--r--lib/reline.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/reline.rb b/lib/reline.rb
index 2f2b017d50..b872fe6945 100644
--- a/lib/reline.rb
+++ b/lib/reline.rb
@@ -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}"