ruby-debug 0.9 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,11 @@
1
+ 0.9.1
2
+ - Fixed incorrent stack calculation.
3
+ - Context#stop_next= method aliased as Context#step.
4
+ - Added the 'force' parameter to Context#step_over.
5
+ - Added the 'force' parameter to Context#step.
6
+ - 'next+/step+' commands forces to move to another line
7
+ - Added a new 'forcestep' setting.
8
+
1
9
  0.9
2
10
  - Kernel#debugger method will start the debugger if it's not running.
3
11
  - Added Context#stop_reason method.
@@ -51,6 +51,7 @@ module Debugger
51
51
  @@display_stack_trace = false
52
52
  @@full_file_names = true
53
53
  @@full_class_names = false
54
+ @@force_stepping = false
54
55
 
55
56
  def initialize(state)
56
57
  @state = state
@@ -29,6 +29,9 @@ module Debugger
29
29
  when /^(no)?autoirb$/
30
30
  IRBCommand.always_run = $1.nil?
31
31
  print "autoirb is #{$1.nil? ? 'on' : 'off'}.\n"
32
+ when /^(no)?forcestep$/
33
+ @@force_stepping = $1.nil?
34
+ print "force-stepping is #{$1.nil? ? 'on' : 'off'}.\n"
32
35
  else
33
36
  print "Unknown setting.\n"
34
37
  end
@@ -49,6 +52,7 @@ module Debugger
49
52
  trace - display stack trace when 'eval' raises exception
50
53
  framefullpath - frame will display full file names
51
54
  frameclassname - frame will display class names
55
+ forcestep - make sure 'next/step' commands always move to a new line
52
56
  To disable setting, use 'no' prefix, like 'noautolist'
53
57
  }
54
58
  end
@@ -3,12 +3,13 @@ module Debugger
3
3
  self.need_context = true
4
4
 
5
5
  def regexp
6
- /^\s*n(?:ext)?(?:\s+(\d+))?$/
6
+ /^\s*n(?:ext)?([+-])?(?:\s+(\d+))?$/
7
7
  end
8
8
 
9
9
  def execute
10
- steps = @match[1] ? @match[1].to_i : 1
11
- @state.context.step_over steps, @state.frame_pos
10
+ force = @match[1] == '+' || (@match[1].nil? && @@force_stepping)
11
+ steps = @match[2] ? @match[2].to_i : 1
12
+ @state.context.step_over steps, @state.frame_pos, force
12
13
  @state.proceed
13
14
  end
14
15
 
@@ -19,7 +20,8 @@ module Debugger
19
20
 
20
21
  def help(cmd)
21
22
  %{
22
- n[ext][ nnn]\tstep over once or nnn times
23
+ n[ext][+][ nnn]\tstep over once or nnn times,
24
+ \t\t'+' forces to move to another line
23
25
  }
24
26
  end
25
27
  end
@@ -29,11 +31,13 @@ module Debugger
29
31
  self.need_context = true
30
32
 
31
33
  def regexp
32
- /^\s*s(?:tep)?(?:\s+(\d+))?$/
34
+ /^\s*s(?:tep)?([+-])?(?:\s+(\d+))?$/
33
35
  end
34
36
 
35
37
  def execute
36
- @state.context.stop_next = @match[1] ? @match[1].to_i : 1
38
+ force = @match[1] == '+' || (@match[1].nil? && @@force_stepping)
39
+ steps = @match[2] ? @match[2].to_i : 1
40
+ @state.context.step(steps, force)
37
41
  @state.proceed
38
42
  end
39
43
 
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: ruby-debug
5
5
  version: !ruby/object:Gem::Version
6
- version: "0.9"
7
- date: 2007-04-01 13:18:02 -04:00
6
+ version: 0.9.1
7
+ date: 2007-04-02 21:55:54 -04:00
8
8
  summary: Command line interface (CLI) for ruby-debug-base
9
9
  require_paths:
10
10
  - cli
@@ -78,5 +78,5 @@ dependencies:
78
78
  requirements:
79
79
  - - "="
80
80
  - !ruby/object:Gem::Version
81
- version: "0.9"
81
+ version: 0.9.1
82
82
  version: