byebug 6.0.0 → 6.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +2 -3
- data/lib/byebug/commands/break.rb +3 -1
- data/lib/byebug/commands/display.rb +1 -1
- data/lib/byebug/commands/help.rb +2 -0
- data/lib/byebug/commands/up.rb +1 -1
- data/lib/byebug/helpers/eval.rb +14 -12
- data/lib/byebug/processors/command_processor.rb +0 -2
- data/lib/byebug/subcommands.rb +2 -0
- data/lib/byebug/version.rb +1 -1
- metadata +3 -4
- data/lib/byebug/settings/autoeval.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbe8d8d298e3c0b99567a1f38024883979f90910
|
4
|
+
data.tar.gz: 2b39f4c8cd9d970ae1e2d2c29ed4462cf35d322b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8450631530abd699cf86afdfe4787676aa3e4c405c20fadb1acc455dff420b3afbfda3d2e4cab6d0f6a2ae6306e01d8f76b48330efcb69fe8f4182a9bbb5d82
|
7
|
+
data.tar.gz: b992d11ab40ad0641be835e4ecc3b2643fc24d88a19fba43d5f7aa95f2b234011506d9328e6d7e0cad68dbb9e9f906e78a646aa252251ff73b7a1a2c30e94d9a
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -45,6 +45,8 @@ module Byebug
|
|
45
45
|
|
46
46
|
errmsg(pr('break.errors.expression', expr: @match[2]))
|
47
47
|
b.enabled = false
|
48
|
+
rescue => e
|
49
|
+
errmsg(e.message)
|
48
50
|
end
|
49
51
|
|
50
52
|
private
|
@@ -70,7 +72,7 @@ module Byebug
|
|
70
72
|
end
|
71
73
|
|
72
74
|
def target_object(str)
|
73
|
-
k =
|
75
|
+
k = error_eval(str)
|
74
76
|
|
75
77
|
k && k.is_a?(Module) ? k.name : str
|
76
78
|
rescue
|
data/lib/byebug/commands/help.rb
CHANGED
data/lib/byebug/commands/up.rb
CHANGED
data/lib/byebug/helpers/eval.rb
CHANGED
@@ -19,8 +19,6 @@ module Byebug
|
|
19
19
|
# @param expression [String] Expression to evaluate
|
20
20
|
#
|
21
21
|
def single_thread_eval(expression)
|
22
|
-
return error_eval(expression) if Setting[:stack_on_error]
|
23
|
-
|
24
22
|
warning_eval(expression)
|
25
23
|
end
|
26
24
|
|
@@ -29,9 +27,7 @@ module Byebug
|
|
29
27
|
# returning nil in an error happens.
|
30
28
|
#
|
31
29
|
def silent_eval(str, binding = frame._binding)
|
32
|
-
|
33
|
-
rescue StandardError, ScriptError
|
34
|
-
nil
|
30
|
+
safe_eval(str, binding) { |_e| nil }
|
35
31
|
end
|
36
32
|
|
37
33
|
#
|
@@ -39,7 +35,7 @@ module Byebug
|
|
39
35
|
# handling the errors at an error level.
|
40
36
|
#
|
41
37
|
def error_eval(str, binding = frame._binding)
|
42
|
-
safe_eval(str, binding) { |e|
|
38
|
+
safe_eval(str, binding) { |e| fail(e, msg(e)) }
|
43
39
|
end
|
44
40
|
|
45
41
|
#
|
@@ -47,7 +43,7 @@ module Byebug
|
|
47
43
|
# handling the errors at a warning level.
|
48
44
|
#
|
49
45
|
def warning_eval(str, binding = frame._binding)
|
50
|
-
safe_eval(str, binding) { |e|
|
46
|
+
safe_eval(str, binding) { |e| errmsg(msg(e)) }
|
51
47
|
end
|
52
48
|
|
53
49
|
private
|
@@ -55,19 +51,25 @@ module Byebug
|
|
55
51
|
def safe_eval(str, binding)
|
56
52
|
binding.eval(str)
|
57
53
|
rescue StandardError, ScriptError => e
|
58
|
-
|
54
|
+
yield(e)
|
55
|
+
end
|
56
|
+
|
57
|
+
def msg(e)
|
58
|
+
msg = Setting[:stack_on_error] ? error_msg(e) : warning_msg(e)
|
59
|
+
|
60
|
+
pr('eval.exception', text_message: msg)
|
59
61
|
end
|
60
62
|
|
61
63
|
def error_msg(e)
|
62
64
|
at = e.backtrace
|
63
|
-
locations = ["#{at.shift}: #{e.class} Exception(#{e.message})"]
|
64
|
-
locations += at.map { |path| "\tfrom #{path}" }
|
65
65
|
|
66
|
-
|
66
|
+
locations = ["#{at.shift}: #{warning_msg(e)}"]
|
67
|
+
locations += at.map { |path| "\tfrom #{path}" }
|
68
|
+
locations.join("\n")
|
67
69
|
end
|
68
70
|
|
69
71
|
def warning_msg(e)
|
70
|
-
|
72
|
+
"#{e.class} Exception: #{e.message}"
|
71
73
|
end
|
72
74
|
|
73
75
|
#
|
data/lib/byebug/subcommands.rb
CHANGED
data/lib/byebug/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: byebug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Rodriguez
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-08-
|
13
|
+
date: 2015-08-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -152,7 +152,6 @@ files:
|
|
152
152
|
- lib/byebug/remote.rb
|
153
153
|
- lib/byebug/runner.rb
|
154
154
|
- lib/byebug/setting.rb
|
155
|
-
- lib/byebug/settings/autoeval.rb
|
156
155
|
- lib/byebug/settings/autoirb.rb
|
157
156
|
- lib/byebug/settings/autolist.rb
|
158
157
|
- lib/byebug/settings/autosave.rb
|
@@ -189,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
189
188
|
version: '0'
|
190
189
|
requirements: []
|
191
190
|
rubyforge_project:
|
192
|
-
rubygems_version: 2.4.5
|
191
|
+
rubygems_version: 2.4.5.1
|
193
192
|
signing_key:
|
194
193
|
specification_version: 4
|
195
194
|
summary: Ruby 2.0 fast debugger - base + CLI
|