Sha256: aa0b39ea44fd991609a84c2a8ec424e49ad9a2fce26cd0857d908faa06f8de18

Contents?: true

Size: 825 Bytes

Versions: 2

Compression:

Stored size: 825 Bytes

Contents

#!/usr/bin/env ruby

if (ARGV.include? '-h') || (ARGV.include? '--help') || ARGV.length == 0
 dir = File.dirname(__FILE__) + '/../lib'
 puts 'options: '
 for file in Dir[dir + '/backtracer_*.rb'].sort.reverse
  puts '--' + File.basename(file)[11..-4] # of backtracer_locals.rb, just locals
 end
 puts 'ex\'s:', '$ backtracer filename.rb arg1 arg2'
 puts '$ backtracer --simple filename.rb arg1 arg2'
 puts 'or its equivalent:', '$ ruby -rbacktracer_simple filename.rb arg1 arg2'
 exit
end

# expect
# backtracer --plain --simple filename options

if ARGV[0][0..1] == '--'
 require 'backtracer_' + ARGV[0][2..-1] # take it off, too
 ARGV.shift
else
 require 'backtracer'
end

$0 = a = File.expand_path( ARGV[0]) # set $0 for their benefit :)
# known buggy on mingw for some reason?
ARGV.shift
load a

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
backtracer-0.7.2 bin/backtracer
backtracer-0.7.1 bin/backtracer