Sha256: 058cbbb21c034aceeaac3f13c2e165bf695182057a7f7f3edd359c753d1aa907

Contents?: true

Size: 315 Bytes

Versions: 12

Compression:

Stored size: 315 Bytes

Contents

module ::Kernel
  def trace(*args)
    STDOUT.orig_write(format_trace(args))
  end

  def format_trace(args)
    if args.size > 1 && args.first.is_a?(String)
      format("%s: %p\n", args.shift, args.size == 1 ? args.first : args)
    else
      format("%p\n", args.size == 1 ? args.first : args)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
polyphony-0.77 lib/polyphony/core/debug.rb
polyphony-0.76 lib/polyphony/core/debug.rb
polyphony-0.75 lib/polyphony/core/debug.rb
polyphony-0.74 lib/polyphony/core/debug.rb
polyphony-0.73.1 lib/polyphony/core/debug.rb
polyphony-0.73 lib/polyphony/core/debug.rb
polyphony-0.72 lib/polyphony/extensions/debug.rb
polyphony-0.71 lib/polyphony/extensions/debug.rb
polyphony-0.70 lib/polyphony/extensions/debug.rb
polyphony-0.69 lib/polyphony/extensions/debug.rb
polyphony-0.68 lib/polyphony/extensions/debug.rb
polyphony-0.67 lib/polyphony/extensions/debug.rb