[前][次][番号順一覧][スレッド一覧]

ruby-changes:66525

From: aycabta <ko1@a...>
Date: Mon, 21 Jun 2021 18:44:35 +0900 (JST)
Subject: [ruby-changes:66525] 60d1d6aa89 (master): [ruby/reline] Terminfo.tigetstr should be able to receive tiparm in method chain

https://git.ruby-lang.org/ruby.git/commit/?id=60d1d6aa89

From 60d1d6aa897860cb2994d873956dacdf1678269a Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
Date: Wed, 19 May 2021 17:57:30 +0900
Subject: [ruby/reline] Terminfo.tigetstr should be able to receive tiparm in
 method chain

https://github.com/ruby/reline/commit/4a3e308163
---
 lib/reline/terminfo.rb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/reline/terminfo.rb b/lib/reline/terminfo.rb
index 92c6ffc..1029d79 100644
--- a/lib/reline/terminfo.rb
+++ b/lib/reline/terminfo.rb
@@ -57,7 +57,11 @@ module Reline::Terminfo https://github.com/ruby/ruby/blob/trunk/lib/reline/terminfo.rb#L57
   end
 
   def self.tigetstr(capname)
-    @tigetstr.(capname).to_s
+    result = @tigetstr.(capname).to_s
+    def result.tiparm(*args) # for method chain
+      Reline::Terminfo.tiparm(self, *args)
+    end
+    result
   end
 
   def self.tiparm(str, *args)
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]