Merge pull request #4797 from shuujii/remove-unneeded-Array-creation-in-Struct-_inspect

Remove unneeded `Array` creation in `Struct#_inspect`
This commit is contained in:
Yukihiro "Matz" Matsumoto
2019-10-30 00:39:44 +09:00
committed by GitHub
+1 -1
View File
@@ -57,7 +57,7 @@ if Object.const_defined?(:Struct)
end
buf = []
self.each_pair do |k,v|
buf.push [k.to_s + "=" + v._inspect(recur_list)]
buf.push k.to_s + "=" + v._inspect(recur_list)
end
str + buf.join(", ") + ">"
end