byebug 9.0.3 → 9.0.4

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: 6d343499b9880b10f470260db66d852711470e61
4
- data.tar.gz: c9003db4d4426203f8feadce35967527141e79e3
3
+ metadata.gz: 62195d06eef51870d2ec0ce9bba2ebd2b95ce76e
4
+ data.tar.gz: edb0c276f8b0a1713802095539f02de00e4512d0
5
5
  SHA512:
6
- metadata.gz: 0fdafc0ae02185a12ca220d091816ac7e99e9e54721d7f4a1132583025b68ebc4c5f69dcf71fa4510f3248a9c2e2944d1ad7d7b0d35126ff6cb0dbf01b5842f5
7
- data.tar.gz: 54917e0fa06f438bd27f9bcb89a952ba04199460ec61120c86051c7338eaef0d64a8ff39436a75488769c046da7852b6e4c7be21d99bd9620bf9a46867806f6c
6
+ metadata.gz: 7229315ef6635c7c15d0fdcccdb1e765817b88b8a966bfa40267c83a799493b13627083fac82bf1221401cf7e57866d48793ddd7f8faf1523ad73d882c3d6fcf
7
+ data.tar.gz: be19a35440627df7ee9f0e4ff892eb472c2d0f15323ed5c128e88b7f9e5f51d0379e2d844df0bb0626fe55ccf8ffe3c0cf0db8e6ad622142e7019025c4b78c0e
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Master (Unreleased)
4
4
 
5
+ ## 9.0.4 - 2015-05-19
6
+
7
+ ### Fixed
8
+
9
+ * Errors in rc file not being displayed to the user.
10
+
5
11
  ## 9.0.3 - 2016-05-16
6
12
 
7
13
  ### Fixed
@@ -86,6 +86,9 @@ module Byebug
86
86
  output.puts(message)
87
87
  end
88
88
 
89
+ #
90
+ # Prints an output message to the output stream without a final "\n".
91
+ #
89
92
  def print(message)
90
93
  output.print(message)
91
94
  end
@@ -8,9 +8,9 @@ module Byebug
8
8
 
9
9
  def initialize
10
10
  super()
11
- @input = STDIN
12
- @output = STDOUT
13
- @error = STDERR
11
+ @input = $stdin
12
+ @output = $stdout
13
+ @error = $stderr
14
14
  end
15
15
 
16
16
  #
@@ -5,9 +5,10 @@ module Byebug
5
5
  class ScriptInterface < Interface
6
6
  def initialize(file, verbose = false)
7
7
  super()
8
+ @verbose = verbose
8
9
  @input = File.open(file)
9
- @output = verbose ? STDOUT : StringIO.new
10
- @error = verbose ? STDERR : StringIO.new
10
+ @output = verbose ? $stdout : StringIO.new
11
+ @error = $stderr
11
12
  end
12
13
 
13
14
  def read_command(prompt)
@@ -20,7 +21,7 @@ module Byebug
20
21
 
21
22
  def readline(*)
22
23
  while (result = input.gets)
23
- output.puts "+ #{result}"
24
+ output.puts "+ #{result}" if @verbose
24
25
  next if result =~ /^\s*#/
25
26
  return result.chomp
26
27
  end
@@ -109,21 +109,6 @@ module Byebug
109
109
  '(byebug) '
110
110
  end
111
111
 
112
- private
113
-
114
- def auto_cmds_for(run_level)
115
- command_list.select { |cmd| cmd.always_run >= run_level }
116
- end
117
-
118
- #
119
- # Run permanent commands.
120
- #
121
- def run_auto_cmds(run_level)
122
- safely do
123
- auto_cmds_for(run_level).each { |cmd| cmd.new(self).execute }
124
- end
125
- end
126
-
127
112
  def before_repl
128
113
  @proceed = false
129
114
  @prev_line = nil
@@ -150,6 +135,21 @@ module Byebug
150
135
  end
151
136
  end
152
137
 
138
+ private
139
+
140
+ def auto_cmds_for(run_level)
141
+ command_list.select { |cmd| cmd.always_run >= run_level }
142
+ end
143
+
144
+ #
145
+ # Run permanent commands.
146
+ #
147
+ def run_auto_cmds(run_level)
148
+ safely do
149
+ auto_cmds_for(run_level).each { |cmd| cmd.new(self).execute }
150
+ end
151
+ end
152
+
153
153
  #
154
154
  # Executes the received input
155
155
  #
@@ -12,25 +12,19 @@ module Byebug
12
12
  super.select(&:allow_in_control)
13
13
  end
14
14
 
15
- def process_commands
15
+ def repl
16
16
  while (input = interface.read_command(prompt))
17
- command = command_list.match(input)
17
+ safely do
18
+ command = command_list.match(input)
19
+ raise CommandNotFound.new(input) unless command
18
20
 
19
- if command
20
21
  command.new(self, input).execute
21
- else
22
- errmsg('Unknown command')
23
22
  end
24
23
  end
24
+ end
25
25
 
26
+ def after_repl
26
27
  interface.close
27
- rescue IOError, SystemCallError
28
- interface.close
29
- rescue
30
- without_exceptions do
31
- puts "INTERNAL ERROR!!! #{$ERROR_INFO}"
32
- puts $ERROR_INFO.backtrace.map { |l| " #{l}" }.join("\n")
33
- end
34
28
  end
35
29
 
36
30
  #
@@ -3,5 +3,5 @@
3
3
  # Reopen main module to define the library version
4
4
  #
5
5
  module Byebug
6
- VERSION = '9.0.3'.freeze
6
+ VERSION = '9.0.4'.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.3
4
+ version: 9.0.4
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-16 00:00:00.000000000 Z
13
+ date: 2016-05-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler