Sha256: 2af2beadddc2db6a1f7423d21b24cf10d7d62f8bf41f436d68ba266aa0083694
Contents?: true
Size: 264 Bytes
Versions: 11
Compression:
Stored size: 264 Bytes
Contents
if RUBY_VERSION < '1.9.2' class String old_format = instance_method(:%) define_method(:%) do |arg| if arg.is_a?(Hash) self.gsub(/%\{(.*?)\}/) { arg[$1.to_sym] } else old_format.bind(self).call(arg) end end end end
Version data entries
11 entries across 11 versions & 1 rubygems