Permalink
Browse files

'v inspect' is not the same as 'v ins pect'

  • Loading branch information...
1 parent a2a5cb9 commit e2b976d9a144c31a7fb8124f500f80991cbabd5e @os97673 os97673 committed Sep 23, 2013
Showing with 7 additions and 1 deletion.
  1. +1 −1 lib/ruby-debug/commands/variables.rb
  2. +6 −0 test/variables_test.rb
@@ -110,7 +110,7 @@ def help(cmd)
class VarInstanceCommand < Command # :nodoc:
def regexp
# id will be read as first match, name as post match
- /^\s*v(?:ar)?\s+i(?:ns(?:tance)?)?\s*((?:[\\+-]0x)[\dabcdef]+)?/
+ /^\s*v(?:ar)?\s+i(?:ns(?:tance)?)?\s*(?:((?:[\\+-]0x)[\dabcdef]+)|\s|$)/
end
def execute
View
@@ -83,6 +83,12 @@
check_output_includes /@inst_a = 1\n@inst_b = 2/
end
+ it "must not accept 'v insv' as shortcut for 'v ins v'" do
+ enter 'break 25', 'cont', 'v insv'
+ debug_file 'variables'
+ check_output_doesnt_include /@inst_a = 1\n@inst_b = 2/
+ end
+
it "must be able to use i as a shortcut" do
enter 'break 25', 'cont', 'v i v'
debug_file 'variables'

0 comments on commit e2b976d

Please sign in to comment.