byebug 8.2.5 → 9.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/GUIDE.md +3 -17
- data/ext/byebug/byebug.c +4 -4
- data/ext/byebug/byebug.h +0 -3
- data/lib/byebug/commands/edit.rb +1 -1
- data/lib/byebug/commands/irb.rb +4 -3
- data/lib/byebug/commands/pry.rb +3 -3
- data/lib/byebug/commands/restart.rb +1 -1
- data/lib/byebug/frame.rb +6 -3
- data/lib/byebug/helpers/parse.rb +1 -1
- data/lib/byebug/helpers/thread.rb +7 -5
- data/lib/byebug/remote.rb +2 -1
- data/lib/byebug/setting.rb +1 -1
- data/lib/byebug/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16e31cc0cae3293a64954196439c341be71e5c7d
|
4
|
+
data.tar.gz: 996d91bb3201f6153aadd970d67e26d961bc6c3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fb01282ca96613f63bc74580c444782b4c5eccf7f14e60b28717e78fb5a94b37fbf764b0f13f6fb1987e65849ffe3714bf2bda0ac68d10c559881c1fec0806f
|
7
|
+
data.tar.gz: bba886ccb2e0d8c52364f2d3933483c2b9de52c12f4a9644ec2c02974e9f9b21bea22cb9caa81ec3547aee597f3e59d8b810605ca189cd6fcb3c1a90c4110478
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,23 @@
|
|
2
2
|
|
3
3
|
## Master (Unreleased)
|
4
4
|
|
5
|
+
## 9.0.0 - 2016-05-11
|
6
|
+
|
7
|
+
## Fixed
|
8
|
+
|
9
|
+
* `irb` command unintentionally changing $PROGRAM_NAME.
|
10
|
+
* `pry` command failing.
|
11
|
+
* Unrelated error message when using `pry` command and Pry not installed.
|
12
|
+
* Interrupting program execution from remote control interface (#239, thanks
|
13
|
+
@izaera).
|
14
|
+
|
15
|
+
### Removed
|
16
|
+
|
17
|
+
* Official Ruby 2.0.0 support. `var local` no longer works in Ruby 2.0. The
|
18
|
+
rest of the commands should still work as before, but `byebug` is no longer
|
19
|
+
tested against this version so they might start breaking in the
|
20
|
+
future.
|
21
|
+
|
5
22
|
## 8.2.5 - 2016-04-27
|
6
23
|
|
7
24
|
### Fixed
|
data/GUIDE.md
CHANGED
@@ -1600,7 +1600,7 @@ not be printed but they won't be forgotten either, so you can toggle them again
|
|
1600
1600
|
later. To do that, use `disable display` or `enable display` followed by the
|
1601
1601
|
expression number.
|
1602
1602
|
|
1603
|
-
### Evaluation of expressions:
|
1603
|
+
### Evaluation of expressions: irb, pry
|
1604
1604
|
|
1605
1605
|
To examine and change data in your script you can just evaluate any Ruby code
|
1606
1606
|
from `byebug`'s prompt. Any input that is not recognized as a command will be
|
@@ -1631,23 +1631,9 @@ $ byebug triangle.rb
|
|
1631
1631
|
9:
|
1632
1632
|
10: if __FILE__ == $0
|
1633
1633
|
(byebug) irb
|
1634
|
-
|
1634
|
+
irb(main):001:0> (0..6).inject { |sum, i| sum += i }
|
1635
1635
|
=> 21
|
1636
|
-
|
1637
|
-
/home/davidr/Proyectos/byebug/old_doc/triangle.rb @ 2
|
1638
|
-
def triangle(n)
|
1639
|
-
(byebug) list # same line range as before going into irb
|
1640
|
-
[1, 10] in /path/to/triangle.rb
|
1641
|
-
1: # Compute the n'th triangle number, the hard way: triangle(n) == (n*(n+1))/2
|
1642
|
-
=> 2: def triangle(n)
|
1643
|
-
3: tri = 0
|
1644
|
-
4: 0.upto(n) do |i|
|
1645
|
-
5: tri += i
|
1646
|
-
6: end
|
1647
|
-
7: tri
|
1648
|
-
8: end
|
1649
|
-
9:
|
1650
|
-
10: if __FILE__ == $0
|
1636
|
+
irb(main):002:0> exit
|
1651
1637
|
(byebug)
|
1652
1638
|
```
|
1653
1639
|
|
data/ext/byebug/byebug.c
CHANGED
@@ -37,9 +37,9 @@ Breakpoints(VALUE self)
|
|
37
37
|
|
38
38
|
/*
|
39
39
|
* call-seq:
|
40
|
-
* Byebug.catchpoints ->
|
40
|
+
* Byebug.catchpoints -> hash
|
41
41
|
*
|
42
|
-
* Returns
|
42
|
+
* Returns the catchpoints hash.
|
43
43
|
*/
|
44
44
|
static VALUE
|
45
45
|
Catchpoints(VALUE self)
|
@@ -352,7 +352,7 @@ return_event(VALUE trace_point, void *data)
|
|
352
352
|
{
|
353
353
|
file = rb_tracearg_path(trace_arg);
|
354
354
|
/*
|
355
|
-
*
|
355
|
+
* @todo Sometimes the TracePoint API gives some return events without
|
356
356
|
* file:line information, so we need to guard for nil until we know what's
|
357
357
|
* going on. This happens, for example, with active_support core extensions:
|
358
358
|
*
|
@@ -841,7 +841,7 @@ Set_post_mortem(VALUE self, VALUE value)
|
|
841
841
|
* call-seq:
|
842
842
|
* Byebug.add_catchpoint(exception) -> exception
|
843
843
|
*
|
844
|
-
* Adds a new exception to the catchpoints
|
844
|
+
* Adds a new exception to the catchpoints hash.
|
845
845
|
*/
|
846
846
|
static VALUE
|
847
847
|
Add_catchpoint(VALUE self, VALUE value)
|
data/ext/byebug/byebug.h
CHANGED
@@ -121,9 +121,6 @@ extern VALUE context_backtrace_set(const rb_debug_inspector_t * inspector,
|
|
121
121
|
|
122
122
|
/* functions from breakpoint.c */
|
123
123
|
extern void Init_breakpoint(VALUE mByebug);
|
124
|
-
extern VALUE catchpoint_hit_count(VALUE catchpoints, VALUE exception,
|
125
|
-
VALUE * exception_name);
|
126
|
-
|
127
124
|
extern VALUE find_breakpoint_by_pos(VALUE breakpoints, VALUE source, VALUE pos,
|
128
125
|
VALUE bind);
|
129
126
|
|
data/lib/byebug/commands/edit.rb
CHANGED
data/lib/byebug/commands/irb.rb
CHANGED
@@ -25,12 +25,13 @@ module Byebug
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def execute
|
28
|
-
unless processor.interface.
|
28
|
+
unless processor.interface.instance_of?(LocalInterface)
|
29
29
|
return errmsg(pr('base.errors.only_local'))
|
30
30
|
end
|
31
31
|
|
32
|
-
# IRB tries to parse ARGV so we must clear it.
|
33
|
-
|
32
|
+
# @todo IRB tries to parse ARGV so we must clear it (see #197). Add a
|
33
|
+
# test case for it so we can remove this comment.
|
34
|
+
with_clean_argv { IRB.start }
|
34
35
|
end
|
35
36
|
|
36
37
|
private
|
data/lib/byebug/commands/pry.rb
CHANGED
@@ -25,17 +25,17 @@ module Byebug
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def execute
|
28
|
-
unless processor.interface.
|
28
|
+
unless processor.interface.instance_of?(LocalInterface)
|
29
29
|
return errmsg(pr('base.errors.only_local'))
|
30
30
|
end
|
31
31
|
|
32
32
|
begin
|
33
33
|
require 'pry'
|
34
34
|
rescue LoadError
|
35
|
-
errmsg(pr('pry.errors.not_installed'))
|
35
|
+
return errmsg(pr('pry.errors.not_installed'))
|
36
36
|
end
|
37
37
|
|
38
|
-
context.
|
38
|
+
Pry.start(context.frame._binding)
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
data/lib/byebug/frame.rb
CHANGED
@@ -47,13 +47,16 @@ module Byebug
|
|
47
47
|
#
|
48
48
|
# Gets local variables for the frame.
|
49
49
|
#
|
50
|
-
#
|
51
|
-
#
|
50
|
+
# @todo Use `Binding#local_variables` directly once we drop 2.1 support
|
51
|
+
# since it's a public method since ruby 2.2
|
52
52
|
#
|
53
53
|
def locals
|
54
54
|
return [] unless _binding
|
55
55
|
|
56
|
-
_binding.eval('local_variables.
|
56
|
+
_binding.eval('local_variables').each_with_object({}) do |e, a|
|
57
|
+
a[e] = _binding.local_variable_get(e)
|
58
|
+
a
|
59
|
+
end
|
57
60
|
end
|
58
61
|
|
59
62
|
#
|
data/lib/byebug/helpers/parse.rb
CHANGED
@@ -9,7 +9,7 @@ module Byebug
|
|
9
9
|
#
|
10
10
|
# If either +min+ or +max+ is nil, that value has no bound.
|
11
11
|
#
|
12
|
-
#
|
12
|
+
# @todo Remove the `cmd` parameter. It has nothing to do with the method's
|
13
13
|
# purpose.
|
14
14
|
#
|
15
15
|
def get_int(str, cmd, min = nil, max = nil)
|
@@ -28,10 +28,12 @@ module Byebug
|
|
28
28
|
def context_from_thread(thnum)
|
29
29
|
ctx = Byebug.contexts.find { |c| c.thnum.to_s == thnum }
|
30
30
|
|
31
|
-
err =
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
err = if ctx.nil?
|
32
|
+
pr('thread.errors.no_thread')
|
33
|
+
elsif ctx == context
|
34
|
+
pr('thread.errors.current_thread')
|
35
|
+
elsif ctx.ignored?
|
36
|
+
pr('thread.errors.ignored', arg: thnum)
|
35
37
|
end
|
36
38
|
|
37
39
|
[ctx, err]
|
@@ -39,7 +41,7 @@ module Byebug
|
|
39
41
|
|
40
42
|
private
|
41
43
|
|
42
|
-
#
|
44
|
+
# @todo Check whether it is Byebug.current_context or context
|
43
45
|
def location(ctx)
|
44
46
|
return context.location if ctx == Byebug.current_context
|
45
47
|
|
data/lib/byebug/remote.rb
CHANGED
data/lib/byebug/setting.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:
|
4
|
+
version: 9.0.0
|
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: 2016-
|
13
|
+
date: 2016-05-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
189
189
|
version: '0'
|
190
190
|
requirements: []
|
191
191
|
rubyforge_project:
|
192
|
-
rubygems_version: 2.
|
192
|
+
rubygems_version: 2.5.1
|
193
193
|
signing_key:
|
194
194
|
specification_version: 4
|
195
195
|
summary: Ruby 2.0 fast debugger - base + CLI
|