Skip to content

Commit 581e8f2

Browse files
committed
fix running when command-line debug is in the bundler deps
1 parent 9e849ff commit 581e8f2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

bin/rdebug-ide

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
#!/usr/bin/env ruby
2+
# start by patching require, so command-line debug won't get in the way
3+
::Kernel.module_eval do
4+
alias ide_debug_original_require require
5+
def self.require(file)
6+
ide_debug_original_require(file) if file !~ /ruby-debug(.rb)?$/
7+
end
8+
private :require
9+
end
210

311
require 'rubygems'
412
require 'optparse'

0 commit comments

Comments
 (0)