summaryrefslogtreecommitdiff
path: root/lib/reline
diff options
context:
space:
mode:
Diffstat (limited to 'lib/reline')
-rw-r--r--lib/reline/terminfo.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/reline/terminfo.rb b/lib/reline/terminfo.rb
index 95ff082172..b053ba82c4 100644
--- a/lib/reline/terminfo.rb
+++ b/lib/reline/terminfo.rb
@@ -121,6 +121,7 @@ module Reline::Terminfo
end
def self.tigetstr(capname)
+ raise TerminfoError, "capname is not String: #{capname.inspect}" unless capname.is_a?(String)
capability = @tigetstr.(capname)
case capability.to_i
when 0, -1
@@ -138,6 +139,7 @@ module Reline::Terminfo
end
def self.tigetflag(capname)
+ raise TerminfoError, "capname is not String: #{capname.inspect}" unless capname.is_a?(String)
flag = @tigetflag.(capname).to_i
case flag
when -1
@@ -149,6 +151,7 @@ module Reline::Terminfo
end
def self.tigetnum(capname)
+ raise TerminfoError, "capname is not String: #{capname.inspect}" unless capname.is_a?(String)
num = @tigetnum.(capname).to_i
case num
when -2