byebug 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/GUIDE.md +209 -0
  4. data/README.md +11 -2
  5. data/Rakefile +12 -0
  6. data/ext/byebug/byebug.c +50 -53
  7. data/ext/byebug/context.c +0 -24
  8. data/lib/byebug.rb +23 -7
  9. data/lib/byebug/command.rb +35 -24
  10. data/lib/byebug/commands/breakpoints.rb +24 -35
  11. data/lib/byebug/commands/catchpoint.rb +13 -17
  12. data/lib/byebug/commands/condition.rb +14 -19
  13. data/lib/byebug/commands/continue.rb +5 -7
  14. data/lib/byebug/commands/display.rb +3 -3
  15. data/lib/byebug/commands/edit.rb +1 -1
  16. data/lib/byebug/commands/enable.rb +18 -45
  17. data/lib/byebug/commands/eval.rb +1 -1
  18. data/lib/byebug/commands/finish.rb +1 -1
  19. data/lib/byebug/commands/frame.rb +24 -22
  20. data/lib/byebug/commands/info.rb +91 -122
  21. data/lib/byebug/commands/jump.rb +3 -8
  22. data/lib/byebug/commands/list.rb +2 -2
  23. data/lib/byebug/commands/method.rb +6 -8
  24. data/lib/byebug/commands/save.rb +1 -1
  25. data/lib/byebug/commands/set.rb +0 -12
  26. data/lib/byebug/commands/show.rb +9 -21
  27. data/lib/byebug/commands/variables.rb +3 -3
  28. data/lib/byebug/context.rb +13 -2
  29. data/lib/byebug/interface.rb +13 -7
  30. data/lib/byebug/processor.rb +23 -25
  31. data/lib/byebug/version.rb +1 -1
  32. data/old_doc/primes.rb +1 -4
  33. data/test/continue_test.rb +2 -9
  34. data/test/examples/list.rb +1 -1
  35. data/test/examples/trace.rb +1 -0
  36. data/test/help_test.rb +1 -1
  37. data/test/info_test.rb +3 -3
  38. data/test/list_test.rb +7 -1
  39. data/test/method_test.rb +0 -1
  40. data/test/show_test.rb +8 -0
  41. data/test/support/matchers.rb +4 -2
  42. data/test/trace_test.rb +18 -1
  43. metadata +2 -2
@@ -267,6 +267,14 @@ class TestShow < TestDsl::TestCase
267
267
  end
268
268
  end
269
269
 
270
+ describe 'Help' do
271
+ it 'must show help when typing just "show"' do
272
+ enter 'show', 'cont'
273
+ debug_file 'show'
274
+ check_output_includes /List of "show" subcommands:/
275
+ end
276
+ end
277
+
270
278
  describe 'Post Mortem' do
271
279
  it 'must work in post-mortem mode' do
272
280
  enter 'cont', 'show autolist'
@@ -11,14 +11,16 @@ module MiniTest::Assertions
11
11
  #
12
12
  def assert_includes_in_order(given_collection, original_collection, msg = nil)
13
13
  msg = message(msg) do
14
- "Expected #{mu_pp(original_collection)} to include #{mu_pp(given_collection)} in order"
14
+ "Expected #{mu_pp(original_collection)} " \
15
+ "to include #{mu_pp(given_collection)} in order"
15
16
  end
16
17
  assert includes_in_order_result(original_collection, given_collection), msg
17
18
  end
18
19
 
19
20
  def refute_includes_in_order(given_collection, original_collection, msg = nil)
20
21
  msg = message(msg) do
21
- "Expected #{mu_pp(original_collection)} to not include #{mu_pp(given_collection)} in order"
22
+ "Expected #{mu_pp(original_collection)} " \
23
+ "to not include #{mu_pp(given_collection)} in order"
22
24
  end
23
25
  refute includes_in_order_result(original_collection, given_collection), msg
24
26
  end
@@ -3,7 +3,6 @@ require_relative 'test_helper'
3
3
  class TestTrace < TestDsl::TestCase
4
4
 
5
5
  before do
6
- Byebug::Command.settings[:basename] = false
7
6
  untrace_var(:$bla) if defined?($bla)
8
7
  end
9
8
 
@@ -25,6 +24,24 @@ class TestTrace < TestDsl::TestCase
25
24
  "Tracing: #{fullpath('trace')}:4 $bla = 4",
26
25
  "Tracing: #{fullpath('trace')}:7 $bla = 7"
27
26
  end
27
+
28
+ it 'must correctly print lines containing % sign' do
29
+ enter 'cont 7', 'trace on', 'next', 'trace off'
30
+ debug_file 'trace'
31
+ check_output_includes \
32
+ "Tracing: #{fullpath('trace')}:8 $bla = (0 == (7 % $bla))"
33
+ end
34
+
35
+ describe 'when basename set' do
36
+ temporary_change_hash Byebug::Command.settings, :basename, true
37
+
38
+ it 'must correctly print file lines' do
39
+ enter 'tr on', 'cont 7', 'trace off'
40
+ debug_file 'trace'
41
+ check_output_includes \
42
+ "Tracing: #{File.basename(fullpath('trace'))}:7 $bla = 7"
43
+ end
44
+ end
28
45
  end
29
46
 
30
47
  it 'must show an error message if given subcommand is incorrect' do
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: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Rodríguez
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-05-25 00:00:00.000000000 Z
13
+ date: 2013-06-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: columnize