byebug 9.0.5 → 9.0.6

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: b4e23e41b748149fde1e27a62d7acc75dde046cb
4
- data.tar.gz: d0cf42efb883f7e1a1d57e1461d29ba6f14d3554
3
+ metadata.gz: 0efdc94aba70c68b5b35988a7f295775c1571a76
4
+ data.tar.gz: 8fb665c2f83ef93ced0be46b22f1b49742831928
5
5
  SHA512:
6
- metadata.gz: d0eb92662556f8a58e678d63c336621ac5a050e94f8f3cdfc2fd276eb920418f5d2133bd9e038896804bee4299d597dc6870e7cd818f2b0cf532cfc18b4c727a
7
- data.tar.gz: d51f4ebdcd26bacd3f4173559f2ee69fe090c02126b158595b13993fb379103a18297e6af612bbb91bf178f296088e6b77fd16e3ec30a70a2680073c8a312f0f
6
+ metadata.gz: 52cd6fb114e28b5e6e3f1217441bed7516d351385fc02f5cc2eb8b65909222e511531bb81fbdb40e8898fb73aa12c7617bf90605c0a74bc3c40da090e8e0124e
7
+ data.tar.gz: cb91790897351bc489f189f32e438cf24e087ace5c7542acf3932b7eb64fccb74e2950d2e663822579ba7ece77f5c1faed2070200ef3158b059f55b1895b4aab
@@ -2,6 +2,15 @@
2
2
 
3
3
  ## Master (Unreleased)
4
4
 
5
+ ## 9.0.6 - 2016-09-29
6
+
7
+ ### Fixed
8
+
9
+ * Error when using `byebug` with a ruby compiled against libedit (#241).
10
+ * Allow `Byebug.start_server` to yield the block passed to it when the actual
11
+ port is already known (#277, thanks @cben).
12
+ * Use a standard license name so it can be more reliably used by tools (#275).
13
+
5
14
  ## 9.0.5 - 2016-05-28
6
15
 
7
16
  ### Fixed
@@ -82,9 +82,7 @@ module Byebug
82
82
  #
83
83
  def inspect
84
84
  meths = %w(id pos source expr hit_condition hit_count hit_value enabled?)
85
- values = meths.map do |field|
86
- "#{field}: #{send(field)}"
87
- end.join(', ')
85
+ values = meths.map { |field| "#{field}: #{send(field)}" }.join(', ')
88
86
  "#<Byebug::Breakpoint #{values}>"
89
87
  end
90
88
  end
@@ -40,7 +40,7 @@ module Byebug
40
40
  n_frames = 1
41
41
  end
42
42
 
43
- force = n_frames == 0 ? true : false
43
+ force = n_frames.zero? ? true : false
44
44
  context.step_out(context.frame.pos + n_frames, force)
45
45
  context.frame = 0
46
46
  processor.proceed!
@@ -53,7 +53,7 @@ module Byebug
53
53
  hits = brkpt.hit_count
54
54
  return unless hits > 0
55
55
 
56
- s = (hits > 1) ? 's' : ''
56
+ s = hits > 1 ? 's' : ''
57
57
  puts " breakpoint already hit #{hits} time#{s}"
58
58
  end
59
59
  end
@@ -39,7 +39,7 @@ module Byebug
39
39
  end
40
40
 
41
41
  def enable_disable_display(is_enable, args)
42
- return errmsg(pr('toggle.errors.no_display')) if 0 == n_displays
42
+ return errmsg(pr('toggle.errors.no_display')) if n_displays.zero?
43
43
 
44
44
  selected_displays = args ? args.split(/ +/) : [1..n_displays + 1]
45
45
 
@@ -21,6 +21,13 @@ module Byebug
21
21
  self.size = 0
22
22
  end
23
23
 
24
+ #
25
+ # Array holding the list of commands in history
26
+ #
27
+ def buffer
28
+ Readline::HISTORY.to_a
29
+ end
30
+
24
31
  #
25
32
  # Restores history from disk.
26
33
  #
@@ -74,7 +81,7 @@ module Byebug
74
81
  def to_s(n_cmds)
75
82
  show_size = n_cmds ? specific_max_size(n_cmds) : default_max_size
76
83
 
77
- commands = Readline::HISTORY.to_a.last(show_size)
84
+ commands = buffer.last(show_size)
78
85
 
79
86
  last_ids(show_size).zip(commands).map do |l|
80
87
  format('%5d %s', l[0], l[1])
@@ -115,7 +122,7 @@ module Byebug
115
122
  return true if /^\s*$/ =~ buf
116
123
  return false if Readline::HISTORY.empty?
117
124
 
118
- Readline::HISTORY[Readline::HISTORY.length - 1] == buf
125
+ buffer[Readline::HISTORY.length - 1] == buf
119
126
  end
120
127
  end
121
128
  end
@@ -20,9 +20,7 @@ module Byebug
20
20
  # @param prompt Prompt to be displayed.
21
21
  #
22
22
  def readline(prompt)
23
- with_repl_like_sigint do
24
- Readline.readline(prompt, false) || EOF_ALIAS
25
- end
23
+ with_repl_like_sigint { Readline.readline(prompt) || EOF_ALIAS }
26
24
  end
27
25
 
28
26
  #
@@ -34,9 +34,7 @@ module Byebug
34
34
  Context.interface = nil
35
35
  start
36
36
 
37
- start_control(host, port == 0 ? 0 : port + 1)
38
-
39
- yield if block_given?
37
+ start_control(host, port.zero? ? 0 : port + 1)
40
38
 
41
39
  mutex = Mutex.new
42
40
  proceed = ConditionVariable.new
@@ -44,6 +42,8 @@ module Byebug
44
42
  server = TCPServer.new(host, port)
45
43
  self.actual_port = server.addr[1]
46
44
 
45
+ yield if block_given?
46
+
47
47
  @thread = DebugThread.new do
48
48
  while (session = server.accept)
49
49
  Context.interface = RemoteInterface.new(session)
@@ -3,5 +3,5 @@
3
3
  # Reopen main module to define the library version
4
4
  #
5
5
  module Byebug
6
- VERSION = '9.0.5'.freeze
6
+ VERSION = '9.0.6'.freeze
7
7
  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: 9.0.5
4
+ version: 9.0.6
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-05-28 00:00:00.000000000 Z
13
+ date: 2016-09-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -171,7 +171,7 @@ files:
171
171
  - lib/byebug/version.rb
172
172
  homepage: http://github.com/deivid-rodriguez/byebug
173
173
  licenses:
174
- - BSD
174
+ - BSD-2-Clause
175
175
  metadata: {}
176
176
  post_install_message:
177
177
  rdoc_options: []
@@ -189,9 +189,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  version: '0'
190
190
  requirements: []
191
191
  rubyforge_project:
192
- rubygems_version: 2.5.1
192
+ rubygems_version: 2.6.7
193
193
  signing_key:
194
194
  specification_version: 4
195
195
  summary: Ruby 2.0 fast debugger - base + CLI
196
196
  test_files: []
197
- has_rdoc: