File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed
Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 1+ require 'pathname' if RUBY_VERSION < '1.9'
2+
13module Debugger
24 class AddBreakpoint < Command # :nodoc:
35 self . control = true
@@ -35,8 +37,7 @@ def execute
3537 end
3638 file = klass . name if klass
3739 else
38- file = File . expand_path ( file ) if file . index ( File ::SEPARATOR ) || \
39- File ::ALT_SEPARATOR && file . index ( File ::ALT_SEPARATOR )
40+ file = realpath ( file )
4041 end
4142 end
4243
@@ -63,6 +64,19 @@ def help(cmd)
6364 }
6465 end
6566 end
67+
68+ private
69+ def realpath ( filename )
70+ filename = File . expand_path ( filename ) if filename . index ( File ::SEPARATOR ) || \
71+ File ::ALT_SEPARATOR && filename . index ( File ::ALT_SEPARATOR )
72+ if defined? ( JRUBY_VERSION )
73+ java . io . File . new ( filename ) . canonical_path
74+ elsif RUBY_VERSION < '1.9'
75+ filename
76+ else
77+ File . realpath ( filename )
78+ end
79+ end
6680 end
6781
6882 class BreakpointsCommand < Command # :nodoc:
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ def print(*args)
2828
2929 def close
3030 @socket . close
31- rescue IOError
31+ rescue IOError , SystemCallError
3232 end
3333
3434 # Workaround for JRuby issue http://jira.codehaus.org/browse/JRUBY-2063
Original file line number Diff line number Diff line change 11module Debugger
2- IDE_VERSION = '0.4.23.beta2 '
2+ IDE_VERSION = '0.4.23.beta3 '
33end
You can’t perform that action at this time.
0 commit comments