diff options
Diffstat (limited to 'lib/reline/terminfo.rb')
-rw-r--r-- | lib/reline/terminfo.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/reline/terminfo.rb b/lib/reline/terminfo.rb index 53809c4937..5c881a375c 100644 --- a/lib/reline/terminfo.rb +++ b/lib/reline/terminfo.rb @@ -72,12 +72,14 @@ module Reline::Terminfo end end - def self.tigetstr(capname) - result = @tigetstr.(capname).to_s - def result.tiparm(*args) # for method chain + class StringWithTiparm < String + def tiparm(*args) # for method chain Reline::Terminfo.tiparm(self, *args) end - result + end + + def self.tigetstr(capname) + StringWithTiparm.new(@tigetstr.(capname).to_s) end def self.tiparm(str, *args) |