ruby-debug 0.10.5.rc9 → 0.10.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1ad12b6099ea8c75ce95151f191e73d537be65a8
4
+ data.tar.gz: 8cc16530034a71493111be9b45b59698b297e11d
5
+ SHA512:
6
+ metadata.gz: 738699e79de52b72482eca906c45222a717d9d2749716dfb94fd862c3f1cb7def69f73d9d6a036d49719f10efe43322f2bd98a6f001ae697496dd826ea6ead2f
7
+ data.tar.gz: 60cbca29692b07d8a70318bb3ca9ba7b3d6aa094e6b538413022154c3b5a7a0fca61c1f6ed5988cea6d1ad275b7db9563b004dba308f6bcacaf581bbdcca7968
data/CHANGES CHANGED
@@ -1,3 +1,7 @@
1
+ 0.10.6
2
+ 08/27/15
3
+ - added support for file filtering for jruby
4
+
1
5
  0.10.5
2
6
  12/25/10
3
7
  - Remove extraneous .RB files messing up Microsoft Windows
data/README CHANGED
@@ -148,6 +148,10 @@ Then you may run just as you used to:
148
148
 
149
149
  For more information see: http://bashdb.sourceforge.net/ruby-debug.html
150
150
 
151
+ To build run:
152
+
153
+ $ rake java gem
154
+
151
155
  == License
152
156
 
153
157
  See MIT-LICENSE for license information.
@@ -4,6 +4,7 @@ require 'socket'
4
4
  require 'thread'
5
5
  require 'ruby-debug-base'
6
6
  require 'ruby-debug/processor'
7
+ require 'linecache'
7
8
 
8
9
  module Debugger
9
10
  self.handler = CommandProcessor.new
@@ -40,7 +41,20 @@ module Debugger
40
41
  def interface=(value) # :nodoc:
41
42
  handler.interface = value
42
43
  end
43
-
44
+
45
+ def source_reload
46
+ LineCache::clear_file_cache
47
+ end
48
+
49
+ # Get line +line_number+ from file named +filename+. Return "\n"
50
+ # there was a problem. Leaking blanks are stripped off.
51
+ def line_at(filename, line_number) # :nodoc:
52
+ @reload_on_change=nil unless defined?(@reload_on_change)
53
+ line = LineCache::getline(filename, line_number, @reload_on_change)
54
+ return "\n" unless line
55
+ return "#{line.gsub(/^\s+/, '').chomp}\n"
56
+ end
57
+
44
58
  #
45
59
  # Starts a remote debugger.
46
60
  #
@@ -38,6 +38,7 @@ module Debugger
38
38
  cmds = @state.commands.map{ |cmd| cmd.help_command }
39
39
  cmds = cmds.flatten.uniq.sort
40
40
  print columnize(cmds, self.class.settings[:width])
41
+ print "\n"
41
42
  end
42
43
  end
43
44
  print "\n"
@@ -223,6 +223,7 @@ item. If \'verbose\' is given then the entire stack frame is shown.'],
223
223
  if breakpoints
224
224
  print "\tbreakpoint line numbers:\n"
225
225
  print columnize(breakpoints.to_a.sort, self.class.settings[:width])
226
+ print "\n"
226
227
  end
227
228
  end
228
229
 
@@ -1,3 +1,5 @@
1
+ begin # rescue ArgumentError
2
+
1
3
  require 'irb'
2
4
 
3
5
  module IRB # :nodoc:
@@ -153,7 +155,7 @@ module Debugger
153
155
  else
154
156
  file = @state.context.frame_file(0)
155
157
  line = @state.context.frame_line(0)
156
- CommandProcessor.print_location_and_text(file, line)
158
+ @state.processor.print_location_and_text(file, line)
157
159
  @state.previous_line = nil
158
160
  end
159
161
 
@@ -190,3 +192,7 @@ dbgr ['list', '10'] # same as "list 10" inside debugger
190
192
  end
191
193
  end
192
194
 
195
+ rescue ArgumentError
196
+ # (GF) require 'irb' raises ArgumentError attempting to load readline in JRuby on Android
197
+ end
198
+
@@ -53,15 +53,15 @@ module Debugger
53
53
  end
54
54
  elsif @match[1]
55
55
  obj = debug_eval(@match.post_match)
56
- print "%s\n", columnize(obj.methods.sort(),
57
- self.class.settings[:width])
56
+ print "%s\n\n", columnize(obj.methods.sort(),
57
+ self.class.settings[:width])
58
58
  else
59
59
  obj = debug_eval(@match.post_match)
60
60
  unless obj.kind_of? Module
61
61
  print "Should be Class/Module: %s\n", @match.post_match
62
62
  else
63
- print "%s\n", columnize(obj.instance_methods(false).sort(),
64
- self.class.settings[:width])
63
+ print "%s\n\n", columnize(obj.instance_methods(false).sort(),
64
+ self.class.settings[:width])
65
65
  end
66
66
  end
67
67
  end
@@ -18,7 +18,11 @@ module Debugger
18
18
  def execute
19
19
  if @match[1] or confirm("Really quit? (y/n) ")
20
20
  @state.interface.finalize
21
- exit! # exit -> exit!: No graceful way to stop threads...
21
+ if defined? JRUBY_VERSION
22
+ java.lang.Runtime.getRuntime().halt(0)
23
+ else
24
+ exit! # exit -> exit!: No graceful way to stop threads...
25
+ end
22
26
  end
23
27
  end
24
28
 
@@ -13,7 +13,7 @@ module Debugger
13
13
  require 'readline'
14
14
  @have_readline = true
15
15
  @history_save = true
16
- rescue LoadError
16
+ rescue LoadError, ArgumentError
17
17
  @have_readline = false
18
18
  @history_save = false
19
19
  end
@@ -86,9 +86,17 @@ module Debugger
86
86
  def confirm(prompt)
87
87
  readline(prompt, false)
88
88
  end
89
-
89
+
90
90
  def print(*args)
91
- STDOUT.printf(*args)
91
+ if args.count > 1
92
+ STDOUT.printf(*args)
93
+ else
94
+ # if args[0].is_a? Array
95
+ # STDOUT.printf(args[0])
96
+ # else
97
+ STDOUT.print args[0]
98
+ # end
99
+ end
92
100
  end
93
101
 
94
102
  def close
@@ -132,7 +140,7 @@ module Debugger
132
140
  def readline(prompt, hist)
133
141
  Readline::readline(prompt, hist)
134
142
  end
135
- rescue LoadError
143
+ rescue LoadError, ArgumentError
136
144
  def readline(prompt, hist)
137
145
  @histfile = ''
138
146
  @hist_save = false
@@ -114,8 +114,9 @@ module Debugger
114
114
  end
115
115
  end
116
116
 
117
- def self.print_location_and_text(file, line)
118
- file_line = "%s:%s\n%s" % [canonic_file(file), line,
117
+ # (GF) made this an instance method so #print calls @interface#print
118
+ def print_location_and_text(file, line)
119
+ file_line = "%s:%s\n%s" % [CommandProcessor.canonic_file(file), line,
119
120
  Debugger.line_at(file, line)]
120
121
  # FIXME: use annotations routines
121
122
  if Debugger.annotate.to_i > 2
@@ -306,7 +307,7 @@ module Debugger
306
307
  end
307
308
 
308
309
  preloop(@commands, context)
309
- CommandProcessor.print_location_and_text(file, line)
310
+ print_location_and_text(file, line)
310
311
  while !state.proceed?
311
312
  input = if @interface.command_queue.empty?
312
313
  @interface.read_command(prompt(context))
metadata CHANGED
@@ -1,48 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-debug
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: 7
5
- version: 0.10.5.rc9
4
+ version: 0.10.6
6
5
  platform: ruby
7
6
  authors:
8
7
  - Kent Sibilev
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-11-12 00:00:00.000000000 Z
11
+ date: 2015-10-12 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - '>='
17
+ - !ruby/object:Gem::Version
18
+ version: '0.1'
15
19
  name: columnize
20
+ prerelease: false
21
+ type: :runtime
16
22
  version_requirements: !ruby/object:Gem::Requirement
17
23
  requirements:
18
24
  - - '>='
19
25
  - !ruby/object:Gem::Version
20
26
  version: '0.1'
21
- none: false
27
+ - !ruby/object:Gem::Dependency
22
28
  requirement: !ruby/object:Gem::Requirement
23
29
  requirements:
24
- - - '>='
30
+ - - ~>
25
31
  - !ruby/object:Gem::Version
26
- version: '0.1'
27
- none: false
32
+ version: 1.3.1
33
+ name: linecache
28
34
  prerelease: false
29
35
  type: :runtime
30
- - !ruby/object:Gem::Dependency
31
- name: ruby-debug-base
32
36
  version_requirements: !ruby/object:Gem::Requirement
33
37
  requirements:
34
38
  - - ~>
35
39
  - !ruby/object:Gem::Version
36
- version: 0.10.5.rc9.0
37
- none: false
40
+ version: 1.3.1
41
+ - !ruby/object:Gem::Dependency
38
42
  requirement: !ruby/object:Gem::Requirement
39
43
  requirements:
40
44
  - - ~>
41
45
  - !ruby/object:Gem::Version
42
- version: 0.10.5.rc9.0
43
- none: false
46
+ version: 0.10.6.0
47
+ name: ruby-debug-base
44
48
  prerelease: false
45
49
  type: :runtime
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 0.10.6.0
46
55
  description: |
47
56
  A generic command line interface for ruby-debug.
48
57
  email: ksibilev@yahoo.com
@@ -97,6 +106,7 @@ files:
97
106
  - rdbg.rb
98
107
  homepage: https://github.com/ruby-debug/
99
108
  licenses: []
109
+ metadata: {}
100
110
  post_install_message:
101
111
  rdoc_options: []
102
112
  require_paths:
@@ -106,17 +116,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
106
116
  - - '>='
107
117
  - !ruby/object:Gem::Version
108
118
  version: '0'
109
- none: false
110
119
  required_rubygems_version: !ruby/object:Gem::Requirement
111
120
  requirements:
112
- - - '>'
121
+ - - '>='
113
122
  - !ruby/object:Gem::Version
114
- version: 1.3.1
115
- none: false
123
+ version: '0'
116
124
  requirements: []
117
125
  rubyforge_project:
118
- rubygems_version: 1.8.24
126
+ rubygems_version: 2.1.9
119
127
  signing_key:
120
- specification_version: 3
128
+ specification_version: 4
121
129
  summary: Command line interface (CLI) for ruby-debug-base
122
130
  test_files: []