ruby-debug-completion 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,2 +1,5 @@
1
+ == 0.1.1
2
+ ** Rescue unexpected errors from Debugger::Command#get_binding
3
+
1
4
  == 0.1.0
2
5
  ** Initial release!
data/README.rdoc CHANGED
@@ -11,7 +11,11 @@ Install the gem with:
11
11
 
12
12
  == Setup
13
13
 
14
- Add this after your `require 'ruby-debug'` line:
14
+ To have ruby-debug automatically use this gem:
15
+
16
+ echo "eval require 'ruby-debug/completion'" >> ~/.rdebugrc
17
+
18
+ To require in a script or application, place after your `require 'ruby-debug'` line:
15
19
 
16
20
  require 'ruby-debug/completion'
17
21
 
@@ -4,7 +4,7 @@ require 'bond'
4
4
  module Debugger
5
5
  module Completion
6
6
  extend self
7
- VERSION = '0.1.0'
7
+ VERSION = '0.1.1'
8
8
  COMMANDS = [ "backtrace", "break", "catch", "condition", "continue",
9
9
  "delete", "disable", "display", "down", "edit", "enable", "eval", "exit",
10
10
  "finish", "frame", "help", "info", "irb", "list", "method", "next",
@@ -51,8 +51,8 @@ module Debugger
51
51
  end
52
52
 
53
53
  def debugger_eval(string)
54
- bdg = (cmd = first_object(Debugger::Command)) ? cmd.send(:get_binding) : TOPLEVEL_BINDING
55
- eval string, bdg
54
+ bdg = (cmd = first_object(Debugger::Command)) && cmd.send(:get_binding) rescue nil
55
+ eval string, bdg || TOPLEVEL_BINDING
56
56
  end
57
57
 
58
58
  def first_object(klass)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-debug-completion
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Gabriel Horner