summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Evans <[email protected]>2025-04-22 07:14:33 -0700
committergit <[email protected]>2025-04-22 15:21:07 +0000
commit00b1a9cde6bc115119baede027ce1a986df2c0a9 (patch)
treebe1d5ac6736bdd58db28e20b41124b9f0e8aa327
parent3ce5d89c206a54cbf32032674c9edf6f649e95f6 (diff)
[ruby/pp] Rename EMPTY_HASH to EMPTY_KWHASH
https://github.com/ruby/pp/commit/efe5bc878f
-rw-r--r--lib/pp.rb6
1 files 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)