Sha256: f8586fb50fb87eb15b3ce0a2cdc28100608746ba1b28de875b9d34eff7d8ef58
Contents?: true
Size: 394 Bytes
Versions: 10
Compression:
Stored size: 394 Bytes
Contents
module Kernel # Alternate to standard #p method that outputs # Kernel#inspect to stdout, but also passes through # the orginal argument(s) ... # # x = 1 # r = 4 + p(1) # p r # # produces ... # # 1 # 5 # # TODO: DEPRECATE as of 1.9, _if_ it will do this. def p(*x) x.each{ |e| puts e.inspect } #p(*x) x.size > 1 ? x : x.last #x.last end end
Version data entries
10 entries across 9 versions & 2 rubygems