byebug 3.1.1 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 673bc1c2a7e1ea0dfb45206a0abc516a6793a82e
4
- data.tar.gz: 67fbb724485010a1d70168c85ecbe21b10d78635
3
+ metadata.gz: 960dc1ecb2fe9ff5b35966884c7cee07438ea3c5
4
+ data.tar.gz: 081117a82d94544eaa12479415886bb043e3835c
5
5
  SHA512:
6
- metadata.gz: c571328932929c3348666a7f6ad0cc677f667264df686f56c90cdb9b8953700eb4e5536ff068041fe2776bc9a5b41e949ee3ccb20ef293075608f3377bfaa246
7
- data.tar.gz: b2ec5b7b581b4fbf9698fb01ebe471b683f1ee73b35f1060215c3739fbae2309c3b0ae1b21da0a863506c412f56a687333662b852048bc1fcf187478053bfe85
6
+ metadata.gz: a8f0ff414f1341bc137b5a08e1091bbc27e315cffee95f65a235e008973156d830c3fccb8441d6cc85357312d1e18405cc4fcb30c1068d30f0131df55e556d22
7
+ data.tar.gz: c5034ade9a0708f284fc9ea0f4c32d27643052109acdcd9783987b4e7ff2009ee10b39d24f3382d96e0d322b63ed2ca8da49f37d7d6be1be1fb305f43fd99d06
@@ -1,3 +1,9 @@
1
+ # 3.1.2
2
+
3
+ * Really fix starting `post_mortem` mode in bin/byebug
4
+ * Fix starting line tracing in bin/byebug
5
+
6
+
1
7
  # 3.1.1
2
8
 
3
9
  * Fix starting `post_mortem` mode in bin/byebug
data/bin/byebug CHANGED
@@ -72,17 +72,21 @@ def debug_program(options)
72
72
  end
73
73
  end
74
74
 
75
- # Do a shell-like path lookup for prog_script and return the results.
76
- # If we can't find anything return prog_script.
75
+ #
76
+ # Do a shell-like path lookup for prog_script and return the results. If we
77
+ # can't find anything return prog_script.
78
+ #
77
79
  def whence_file(prog_script)
78
80
  if prog_script.index(File::SEPARATOR)
79
81
  # Don't search since this name has path separator components
80
82
  return prog_script
81
83
  end
84
+
82
85
  for dirname in ENV['PATH'].split(File::PATH_SEPARATOR) do
83
86
  prog_script_try = File.join(dirname, prog_script)
84
87
  return prog_script_try if File.exist?(prog_script_try)
85
88
  end
89
+
86
90
  # Failure
87
91
  return prog_script
88
92
  end
@@ -210,7 +214,7 @@ if ARGV.empty?
210
214
  exit(-1)
211
215
  end
212
216
 
213
- # save script name
217
+ # Save debugged program
214
218
  prog_script = ARGV.shift
215
219
  prog_script = whence_file(prog_script) unless File.exist?(prog_script)
216
220
  Byebug::PROG_SCRIPT = File.expand_path prog_script
@@ -218,11 +222,11 @@ Byebug::PROG_SCRIPT = File.expand_path prog_script
218
222
  # Set up trace hook for byebug
219
223
  Byebug.start
220
224
 
221
- Byebug.setting[:post_mortem] = options.post_mortem
222
-
223
225
  # load initrc script (e.g. .byebugrc)
224
226
  Byebug.run_init_script(StringIO.new) unless options.nx
225
227
 
228
+ Byebug::Setting[:post_mortem] = options.post_mortem
229
+
226
230
  # run restore-settings startup script if specified
227
231
  if options.restart_script
228
232
  require 'fileutils'
@@ -236,7 +240,7 @@ if options.script
236
240
  end
237
241
 
238
242
  options.stop = false if options.tracing
239
- Byebug.tracing = options.tracing
243
+ Byebug::Setting[:linetrace] = options.tracing
240
244
 
241
245
  loop do
242
246
  debug_program(options)
@@ -2,9 +2,10 @@ module Byebug
2
2
  module ParseFunctions
3
3
  Position_regexp = '(?:(\d+)|(.+?)[:.#]([^.:\s]+))'
4
4
 
5
- # Parse 'str' of command 'cmd' as an integer between
6
- # min and max. If either min or max is nil, that
7
- # value has no bound.
5
+ #
6
+ # Parse 'str' of command 'cmd' as an integer between min and max. If either
7
+ # min or max is nil, that value has no bound.
8
+ #
8
9
  def get_int(str, cmd, min = nil, max = nil, default = 1)
9
10
  unless str
10
11
  return default if default
@@ -28,7 +29,9 @@ module Byebug
28
29
  end
29
30
  end
30
31
 
31
- # Return true if code is syntactically correct for Ruby.
32
+ #
33
+ # Returns true if code is syntactically correct for Ruby.
34
+ #
32
35
  def syntax_valid?(code)
33
36
  eval("BEGIN {return true}\n#{code}", nil, '', 0)
34
37
  rescue SyntaxError
@@ -1,3 +1,3 @@
1
1
  module Byebug
2
- VERSION = '3.1.1'
2
+ VERSION = '3.1.2'
3
3
  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.1
4
+ version: 3.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Rodriguez