Sha256: 228b04115b6dceb6ea17409f07ae15f2d4418fb5a158c07f40a9729736d36915

Contents?: true

Size: 314 Bytes

Versions: 34

Compression:

Stored size: 314 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

34 entries across 34 versions & 1 rubygems

Version Path
polyphony-0.66 lib/polyphony/extensions/debug.rb
polyphony-0.65 lib/polyphony/extensions/debug.rb
polyphony-0.64 lib/polyphony/extensions/debug.rb
polyphony-0.63 lib/polyphony/extensions/debug.rb
polyphony-0.62 lib/polyphony/extensions/debug.rb
polyphony-0.61 lib/polyphony/extensions/debug.rb
polyphony-0.60 lib/polyphony/extensions/debug.rb
polyphony-0.59.1 lib/polyphony/extensions/debug.rb
polyphony-0.59 lib/polyphony/extensions/debug.rb
polyphony-0.58 lib/polyphony/extensions/debug.rb
polyphony-0.57.0 lib/polyphony/extensions/debug.rb
polyphony-0.56.0 lib/polyphony/extensions/debug.rb
polyphony-0.55.0 lib/polyphony/extensions/debug.rb
polyphony-0.54.0 lib/polyphony/extensions/debug.rb
polyphony-0.53.2 lib/polyphony/extensions/debug.rb
polyphony-0.53.1 lib/polyphony/extensions/debug.rb
polyphony-0.53.0 lib/polyphony/extensions/debug.rb
polyphony-0.52.0 lib/polyphony/extensions/debug.rb
polyphony-0.51.0 lib/polyphony/extensions/debug.rb
polyphony-0.50.1 lib/polyphony/extensions/debug.rb