blue_shell 0.7 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/blue_shell/bash.rb +1 -4
- data/lib/blue_shell/version.rb +1 -1
- metadata +1 -1
data/lib/blue_shell/bash.rb
CHANGED
@@ -21,9 +21,6 @@ module BlueShell
|
|
21
21
|
# @param [Symbol] the stream to hook into (:stderr or :stdout)
|
22
22
|
# @param [Lambda] the code to execute
|
23
23
|
def add_hook(type, lambda)
|
24
|
-
# TODO: This should be a custom error
|
25
|
-
raise "May not add hooks while executing." if @executing
|
26
|
-
|
27
24
|
@hooks[type] << lambda
|
28
25
|
end
|
29
26
|
|
@@ -68,7 +65,7 @@ module BlueShell
|
|
68
65
|
end
|
69
66
|
|
70
67
|
def read_thread(type, stream, sink)
|
71
|
-
Thread.new(@hooks[type], stream, sink) do |hooks, stream, sink|
|
68
|
+
Thread.new(@hooks[type].dup, stream, sink) do |hooks, stream, sink|
|
72
69
|
line = nil
|
73
70
|
br = BufferedReader.new(InputStreamReader.new(stream))
|
74
71
|
|
data/lib/blue_shell/version.rb
CHANGED