Sha256: ffafc0010392e739b4b0c0aa2b52da00f50fe15b996717bd485238fb5a422862

Contents?: true

Size: 357 Bytes

Versions: 5

Compression:

Stored size: 357 Bytes

Contents

module Kernel

  # Like #p but gives file and line number.
  #
  #   d("hi")
  #
  # produces
  #
  #   "hi" (/home/dave/projects/foo.rb, 38)
  #
  def d(*x)
    puts "#{x.inspect} #{caller[0]}"
    return *x
  end

  #def d(*x)
  #  puts "#{__FILE__}, #{__LINE__}"
  #  x.each{ |e| puts e.inspect } #p(*x)
  #  x.size > 1 ? x : x.last #x.last
  #end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
facets-2.8.4 lib/core/facets/kernel/d.rb
facets-2.8.3 lib/core/facets/kernel/d.rb
facets-2.8.2 lib/core/facets/kernel/d.rb
facets-2.8.1 lib/core/facets/kernel/d.rb
facets-2.8.0 lib/core/facets/kernel/d.rb