From 00b1a9cde6bc115119baede027ce1a986df2c0a9 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Tue, 22 Apr 2025 07:14:33 -0700 Subject: [PATCH] [ruby/pp] Rename EMPTY_HASH to EMPTY_KWHASH https://github.com/ruby/pp/commit/efe5bc878f --- lib/pp.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pp.rb b/lib/pp.rb index d86bfb9119..1c24ca0d23 100644 --- a/lib/pp.rb +++ b/lib/pp.rb @@ -276,7 +276,7 @@ class PP < PrettyPrint def seplist(list, sep=nil, iter_method=:each) # :yield: element sep ||= lambda { comma_breakable } first = true - kwsplat = EMPTY_HASH + kwsplat = EMPTY_KWHASH list.__send__(iter_method) {|*v| if first first = false @@ -286,10 +286,10 @@ class PP < PrettyPrint kwsplat ? yield(*v, **kwsplat) : yield(*v) } end - EMPTY_HASH = if RUBY_VERSION >= "3.0" + EMPTY_KWHASH = if RUBY_VERSION >= "3.0" {}.freeze end - private_constant :EMPTY_HASH + private_constant :EMPTY_KWHASH # A present standard failsafe for pretty printing any given Object def pp_object(obj)