diff options
author | Jeremy Evans <[email protected]> | 2025-04-22 07:14:33 -0700 |
---|---|---|
committer | git <[email protected]> | 2025-04-22 15:21:07 +0000 |
commit | 00b1a9cde6bc115119baede027ce1a986df2c0a9 (patch) | |
tree | be1d5ac6736bdd58db28e20b41124b9f0e8aa327 | |
parent | 3ce5d89c206a54cbf32032674c9edf6f649e95f6 (diff) |
[ruby/pp] Rename EMPTY_HASH to EMPTY_KWHASH
https://github.com/ruby/pp/commit/efe5bc878f
-rw-r--r-- | lib/pp.rb | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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) |