summaryrefslogtreecommitdiff
path: root/lib/reline
diff options
context:
space:
mode:
Diffstat (limited to 'lib/reline')
-rw-r--r--lib/reline/general_io.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/reline/general_io.rb b/lib/reline/general_io.rb
index 4f605628a3..2f87d718c6 100644
--- a/lib/reline/general_io.rb
+++ b/lib/reline/general_io.rb
@@ -7,7 +7,7 @@ class Reline::GeneralIO
end
def self.encoding
- if @@encoding
+ if defined?(@@encoding)
@@encoding
elsif RUBY_PLATFORM =~ /mswin|mingw/
Encoding::UTF_8