Permalink
Browse files

i should be a shortcut for instance

  • Loading branch information...
1 parent a3c8887 commit a2a5cb956d40c8627bad9ba1eb35131364da740c @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+ins(?:tance)?\s*((?:[\\+-]0x)[\dabcdef]+)?/
+ /^\s*v(?:ar)?\s+i(?:ns(?:tance)?)?\s*((?:[\\+-]0x)[\dabcdef]+)?/
end
def execute
View
@@ -83,6 +83,12 @@
check_output_includes /@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'
+ check_output_includes /@inst_a = 1\n@inst_b = 2/
+ end
+
it "must cut long variable values according to :width setting" do
temporary_change_hash_value(Debugger::Command.settings, :width, 20) do
enter 'break 25', 'cont', 'var instance v'

0 comments on commit a2a5cb9

Please sign in to comment.