byebug 9.0.3 → 9.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/byebug/interface.rb +3 -0
- data/lib/byebug/interfaces/local_interface.rb +3 -3
- data/lib/byebug/interfaces/script_interface.rb +4 -3
- data/lib/byebug/processors/command_processor.rb +15 -15
- data/lib/byebug/processors/script_processor.rb +6 -12
- data/lib/byebug/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62195d06eef51870d2ec0ce9bba2ebd2b95ce76e
|
4
|
+
data.tar.gz: edb0c276f8b0a1713802095539f02de00e4512d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7229315ef6635c7c15d0fdcccdb1e765817b88b8a966bfa40267c83a799493b13627083fac82bf1221401cf7e57866d48793ddd7f8faf1523ad73d882c3d6fcf
|
7
|
+
data.tar.gz: be19a35440627df7ee9f0e4ff892eb472c2d0f15323ed5c128e88b7f9e5f51d0379e2d844df0bb0626fe55ccf8ffe3c0cf0db8e6ad622142e7019025c4b78c0e
|
data/CHANGELOG.md
CHANGED
data/lib/byebug/interface.rb
CHANGED
@@ -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 ?
|
10
|
-
@error =
|
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
|
15
|
+
def repl
|
16
16
|
while (input = interface.read_command(prompt))
|
17
|
-
|
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
|
#
|
data/lib/byebug/version.rb
CHANGED
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.
|
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-
|
13
|
+
date: 2016-05-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|