Sha256: 4d53191b03aad0eeefb4405fd30ffef61faff3ee018113db451fbb03b25b9e58

Contents?: true

Size: 805 Bytes

Versions: 11

Compression:

Stored size: 805 Bytes

Contents

#!/usr/bin/env ruby
#!/usr/bin/env ruby
# $Id$

# Use this to run rdebug without installing it.  We assume that the
# library directories are stored at the same level the directory
# this program. 
module RDebugRunner
  def runner(stdout=nil)

    # Add libraries to load path.
    dirname=File.dirname(__FILE__)
    libs = %w(ext lib cli)
    libs.each { |lib| $:.unshift File.join(dirname, lib) }

    rdebug=ENV['RDEBUG'] || File.join(dirname, 'bin', 'rdebug')
    if stdout
      old_stdout = $stdout
      $stdout.reopen(stdout)
    else
      old_stdout = nil
    end
    load(rdebug, true)
    $stdout.reopen(old_stdout) if old_stdout
    
    # Remove those libraries we just added.
    1.upto(libs.size) {$:.shift}
  end
  module_function :runner
end
if __FILE__ == $0 
  RDebugRunner.runner
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
ruby-debug-0.11.0 rdbg.rb
logstash-output-icinga-1.1.0 vendor/jruby/1.9/gems/ruby-debug-0.10.6/rdbg.rb
ruby-debug-0.10.6 rdbg.rb
ruby-debug-0.10.5.rc9 rdbg.rb
ruby-debug-0.10.5.rc8 rdbg.rb
ruby-debug-0.10.5.rc7 rdbg.rb
ruby-debug-0.10.5.rc5 rdbg.rb
ruby-debug-0.10.5.rc4 rdbg.rb
ruby-debug-0.10.5.rc3 rdbg.rb
ruby-debug-0.10.5.rc2 rdbg.rb
ruby-debug-0.10.5.rc1 rdbg.rb