use is_a? Array for String#% argument check as the original PR did in #2349

parent 9fe8653e
class String
def %(args)
if args.is_a? Hash
sprintf(self, args)
else
if args.is_a? Array
sprintf(self, *args)
else
sprintf(self, args)
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment