1 2 3 4 5 6 7 8 9
class String def %(args) if args.is_a? Array sprintf(self, *args) else sprintf(self, args) end end end