byebug 3.1.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 07f6616707d3f841c7c580f1f5e04ef9534a801d
4
- data.tar.gz: e443182d786d0a652fa2166257727e3fb6298431
3
+ metadata.gz: 673bc1c2a7e1ea0dfb45206a0abc516a6793a82e
4
+ data.tar.gz: 67fbb724485010a1d70168c85ecbe21b10d78635
5
5
  SHA512:
6
- metadata.gz: 6ef519a0d284a6e4b2b7524569d2e164258e9105850366dc73938e1fbf0602ecd008f3d5f67f799529009d7de1bdd0f3389908dc979edaa8184631336ea20333
7
- data.tar.gz: 9f305fd5c78c3a7c8b29ef7e302acc230686986c44a72d3f5e903d4ab4f4df2f99d032bceb67ae00e5ae04302dbbecce92bc86a421549a45346355ff04c7755a
6
+ metadata.gz: c571328932929c3348666a7f6ad0cc677f667264df686f56c90cdb9b8953700eb4e5536ff068041fe2776bc9a5b41e949ee3ccb20ef293075608f3377bfaa246
7
+ data.tar.gz: b2ec5b7b581b4fbf9698fb01ebe471b683f1ee73b35f1060215c3739fbae2309c3b0ae1b21da0a863506c412f56a687333662b852048bc1fcf187478053bfe85
@@ -1,3 +1,8 @@
1
+ # 3.1.1
2
+
3
+ * Fix starting `post_mortem` mode in bin/byebug
4
+
5
+
1
6
  # 3.1.0
2
7
 
3
8
  * `show commands` moved to a separate `history` command.
data/bin/byebug CHANGED
@@ -187,10 +187,8 @@ end
187
187
  opts = process_options(options)
188
188
 
189
189
  begin
190
- Byebug::ARGV = ARGV.clone if not defined? Byebug::ARGV
191
190
  Byebug::BYEBUG_SCRIPT = File.expand_path(__FILE__)
192
191
  Byebug::IGNORED_FILES << Byebug::BYEBUG_SCRIPT
193
- Byebug::INITIAL_DIR = Dir.pwd
194
192
  opts.parse! ARGV
195
193
  rescue StandardError => e
196
194
  puts opts
@@ -218,7 +216,9 @@ prog_script = whence_file(prog_script) unless File.exist?(prog_script)
218
216
  Byebug::PROG_SCRIPT = File.expand_path prog_script
219
217
 
220
218
  # Set up trace hook for byebug
221
- Byebug.start post_mortem: options.post_mortem
219
+ Byebug.start
220
+
221
+ Byebug.setting[:post_mortem] = options.post_mortem
222
222
 
223
223
  # load initrc script (e.g. .byebugrc)
224
224
  Byebug.run_init_script(StringIO.new) unless options.nx
@@ -17,9 +17,8 @@ module Byebug
17
17
  # Configuration file used for startup commands. Default value is .byebugrc
18
18
  INITFILE = '.byebugrc' unless defined?(INITFILE)
19
19
 
20
- # Original ARGV, command line and initial directory to make restarts possible
20
+ # Stores program being debugged to make restarts possible
21
21
  PROG_SCRIPT = $0 unless defined?(PROG_SCRIPT)
22
- INITIAL_DIR = Dir.pwd unless defined?(INITIAL_DIR)
23
22
 
24
23
  class << self
25
24
 
@@ -28,12 +28,6 @@ module Byebug
28
28
  end
29
29
  end
30
30
 
31
- begin
32
- Dir.chdir(Byebug::INITIAL_DIR)
33
- rescue
34
- print "Failed to change initial directory #{Byebug::INITIAL_DIR}"
35
- end
36
-
37
31
  if @match[:args]
38
32
  cmd += " #{@match[:args]}"
39
33
  else
@@ -7,7 +7,7 @@ module Byebug
7
7
  def execute
8
8
  if Byebug::Setting[:autosave]
9
9
  if arg = @match[:num_cmds]
10
- size = get_int(@match[:num_cmds], 'history', 1, Byebug::Setting[:histsize])
10
+ size = get_int(arg, 'history', 1, Byebug::Setting[:histsize])
11
11
  end
12
12
  print Byebug::History.to_s(size || Byebug::Setting[:histsize])
13
13
  else
@@ -1,3 +1,3 @@
1
1
  module Byebug
2
- VERSION = '3.1.0'
2
+ VERSION = '3.1.1'
3
3
  end
@@ -86,23 +86,5 @@ module RestartTest
86
86
  end
87
87
  end
88
88
  end
89
-
90
- describe 'when can\'t change the dir to INITIAL_DIR' do
91
- temporary_change_const Byebug, 'INITIAL_DIR', '/unexistent/path'
92
-
93
- it 'must restart anyway' do
94
- must_restart
95
- enter 'restart'
96
- debug_proc(@example)
97
- end
98
-
99
- it 'must show an error message ' do
100
- must_restart
101
- enter 'restart'
102
- debug_proc(@example)
103
- check_output_includes \
104
- 'Failed to change initial directory /unexistent/path'
105
- end
106
- end
107
89
  end
108
90
  end
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: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Rodriguez