debugger 1.6.1 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -7,6 +7,8 @@ vendor/bundle
7
7
  .bundle
8
8
 
9
9
  lib/ruby_debug.bundle
10
+ lib/ruby_debug.so
11
+
10
12
  ext/ruby_debug/breakpoint.c
11
13
  ext/ruby_debug/ruby_debug.c
12
14
  ext/ruby_debug/ruby_debug.h
@@ -1,3 +1,7 @@
1
+ ## 1.6.2
2
+ * Fix show command
3
+ * Fix var instance command
4
+
1
5
  ## 1.6.1
2
6
  * Bump ruby_core_source dependency
3
7
 
data/README.md CHANGED
@@ -127,12 +127,18 @@ Let's keep this working for the ruby community!
127
127
  * [rb-trepanning](https://github.com/rocky/rb-trepanning) - rewrite of ruby-debug that requires a
128
128
  patched ruby
129
129
 
130
+ ## License
131
+
132
+ Licensing due to the complicated forking history of this project. Licensing is BSD throughout most
133
+ of the repository except for portions of emacs/, doc/ and old_scripts/ which are GPL.
134
+
130
135
  ## Credits
131
136
 
132
137
  * Thanks to the original authors: Kent Sibilev and Mark Moseley
133
138
  * Thanks to astashov for bringing in a new and improved test suite, adding printers support and various bug fixes.
134
139
  * Thanks to windwiny for starting the port to 2.0.0
135
- * Contributors: ericpromislow, jnimety, adammck, hipe, FooBarWidget, aghull, deivid-rodriguez, tessi
140
+ * Contributors: ericpromislow, jnimety, adammck, hipe, FooBarWidget, aghull, deivid-rodriguez,
141
+ tessi, os97673, arthurnn
136
142
  * Fork started on awesome @relevance fridays!
137
143
 
138
144
  ## TODO
@@ -1,5 +1,5 @@
1
1
  module Debugger
2
2
  # TODO: remove version from C ext
3
3
  send :remove_const, :VERSION if const_defined? :VERSION
4
- VERSION = '1.6.1'
4
+ VERSION = '1.6.2'
5
5
  end
@@ -181,8 +181,8 @@ show history size -- Show the size of the command history"],
181
181
  end
182
182
 
183
183
  def execute
184
- if not @match[1]
185
- subcommands = subcmd.map { |s| "show #{s.name} -- #{s.short_help}" }.join("\n")
184
+ if !@match[1]
185
+ subcommands = Subcommands.map { |s| "show #{s.name} -- #{s.short_help}" }.join("\n")
186
186
  print pr("show.errors.no_subcommand", subcommands: subcommands)
187
187
  else
188
188
  args = @match[1].split(/[ \t]+/)
@@ -110,7 +110,7 @@ module Debugger
110
110
  class VarInstanceCommand < Command # :nodoc:
111
111
  def regexp
112
112
  # id will be read as first match, name as post match
113
- /^\s*v(?:ar)?\s+ins(?:tance)?\s*((?:[\\+-]0x)[\dabcdef]+)?/
113
+ /^\s*v(?:ar)?\s+i(?:ns(?:tance)?)?\s*(?:((?:[\\+-]0x)[\dabcdef]+)|\s|$)/
114
114
  end
115
115
 
116
116
  def execute
@@ -23,6 +23,13 @@ describe "Show Command" do
23
23
  describe "args" do
24
24
  temporary_change_hash_value(Debugger::Command.settings, :argv, %w{foo bar})
25
25
 
26
+ it "when no args givenmust show args" do
27
+ Debugger.send(:remove_const, "RDEBUG_SCRIPT") if Debugger.const_defined?("RDEBUG_SCRIPT")
28
+ enter 'show'
29
+ debug_file 'show'
30
+ check_output_includes /\"show\" must be followed by the name of an show command/
31
+ end
32
+
26
33
  it "must show args" do
27
34
  Debugger.send(:remove_const, "RDEBUG_SCRIPT") if Debugger.const_defined?("RDEBUG_SCRIPT")
28
35
  enter 'show args'
@@ -83,6 +83,18 @@ describe "Variables Command" do
83
83
  check_output_includes /@inst_a = 1\n@inst_b = 2/
84
84
  end
85
85
 
86
+ it "must not accept 'v insv' as shortcut for 'v ins v'" do
87
+ enter 'break 25', 'cont', 'v insv'
88
+ debug_file 'variables'
89
+ check_output_doesnt_include /@inst_a = 1\n@inst_b = 2/
90
+ end
91
+
92
+ it "must be able to use i as a shortcut" do
93
+ enter 'break 25', 'cont', 'v i v'
94
+ debug_file 'variables'
95
+ check_output_includes /@inst_a = 1\n@inst_b = 2/
96
+ end
97
+
86
98
  it "must cut long variable values according to :width setting" do
87
99
  temporary_change_hash_value(Debugger::Command.settings, :width, 20) do
88
100
  enter 'break 25', 'cont', 'var instance v'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: debugger
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.6.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-07-08 00:00:00.000000000 Z
14
+ date: 2013-09-25 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: columnize