Special treatment for Hashes, not Arrays; ref #2349

This commit is contained in:
Yukihiro "Matz" Matsumoto
2014-06-03 16:33:30 +09:00
parent fe9f3fdd20
commit 4380f86150
+3 -3
View File
@@ -1,9 +1,9 @@
class String
def %(args)
if args.is_a? Array
sprintf(self, *args)
else
if args.is_a? Hash
sprintf(self, args)
else
sprintf(self, *args)
end
end
end