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

ruby-changes:65912

From: Hiroshi <ko1@a...>
Date: Wed, 21 Apr 2021 20:47:03 +0900 (JST)
Subject: [ruby-changes:65912] 17441a6b1b (master): [ruby/pp] Support < Ruby 3.0

https://git.ruby-lang.org/ruby.git/commit/?id=17441a6b1b

From 17441a6b1bb258d0d67f75c5642db642e10f74ca Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Mon, 28 Dec 2020 13:37:11 +0900
Subject: [ruby/pp] Support < Ruby 3.0

https://github.com/ruby/pp/commit/3ee131ae92
---
 lib/pp.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/pp.rb b/lib/pp.rb
index ce282be..72480e5 100644
--- a/lib/pp.rb
+++ b/lib/pp.rb
@@ -237,7 +237,7 @@ class PP < PrettyPrint https://github.com/ruby/ruby/blob/trunk/lib/pp.rb#L237
         else
           sep.call
         end
-        yield(*v, **{})
+        RUBY_VERSION >= "3.0" ? yield(*v, **{}) : yield(*v)
       }
     end
 
-- 
cgit v1.1


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

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