File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,10 @@ def already_installed(dep)
1818
1919 if RUBY_VERSION < "1.9"
2020 dep = Gem ::Dependency . new ( "ruby-debug-base" , '>=0.10.4' )
21- else
21+ elsif RUBY_VERSION < '2.0'
2222 dep = Gem ::Dependency . new ( "ruby-debug-base19x" , '>=0.11.24' )
23+ else
24+ # dep = Gem::Dependency.new("debase", '> 0')
2325 end
2426
2527 begin
@@ -35,7 +37,7 @@ def already_installed(dep)
3537 puts e . backtrace . join "\n "
3638 exit ( 1 )
3739 end
38- end unless already_installed ( dep )
40+ end unless dep . nil? || already_installed ( dep )
3941end
4042
4143# create dummy rakefile to indicate success
Original file line number Diff line number Diff line change 22require 'stringio'
33require "socket"
44require 'thread'
5- require 'ruby-debug-base'
5+ if ( RUBY_VERSION < '2.0' )
6+ require 'ruby-debug-base'
7+ else
8+ require 'debase'
9+ end
610
711require 'ruby-debug-ide/version'
812require 'ruby-debug-ide/xml_printer'
@@ -101,7 +105,9 @@ def start_control(host, port)
101105 # 127.0.0.1 seemingly works with all systems and with IPv6 as well.
102106 # "localhost" and nil have problems on some systems.
103107 host ||= '127.0.0.1'
104- $stderr. printf "Fast Debugger (ruby-debug-ide #{ IDE_VERSION } , ruby-debug-base #{ VERSION } ) listens on #{ host } :#{ port } \n "
108+ gem_name = ( defined? ( JRUBY_VERSION ) || RUBY_VERSION < '1.9.0' ) ? 'ruby-debug-base' :
109+ RUBY_VERSION < '2.0.0' ? 'ruby-debug-base19x' : 'debase'
110+ $stderr. printf "Fast Debugger (ruby-debug-ide #{ IDE_VERSION } , #{ gem_name } #{ VERSION } ) listens on #{ host } :#{ port } \n "
105111 server = TCPServer . new ( host , port )
106112 while ( session = server . accept )
107113 $stderr. puts "Connected from #{ session . addr [ 2 ] } " if Debugger . cli_debug
You can’t perform that action at this time.
0 commit comments