aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-09-18 15:29:06 -0500
committerJack Nagel2014-09-18 15:29:10 -0500
commite05c769011c66232431332229f0ea4f1f441ee7b (patch)
tree91ee71c618b8ce635c4273286cc4e54df0172c93 /Library
parentc42916feb0c78e9e7cce63f8ccf36cb6532ef7d7 (diff)
downloadhomebrew-e05c769011c66232431332229f0ea4f1f441ee7b.tar.bz2
Delay requiring irb until runtime
Fixes #32410.
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/tree.rb1
-rw-r--r--Library/Homebrew/debrew.rb27
2 files changed, 16 insertions, 12 deletions
diff --git a/Library/Formula/tree.rb b/Library/Formula/tree.rb
index a75024d3a..7298e8a0a 100644
--- a/Library/Formula/tree.rb
+++ b/Library/Formula/tree.rb
@@ -14,6 +14,7 @@ class Tree < Formula
end
def install
+ system "false"
ENV.append 'CFLAGS', '-fomit-frame-pointer'
objs = 'tree.o unix.o html.o xml.o hash.o color.o strverscmp.o json.o'
diff --git a/Library/Homebrew/debrew.rb b/Library/Homebrew/debrew.rb
index bc1495a99..dae4a9758 100644
--- a/Library/Homebrew/debrew.rb
+++ b/Library/Homebrew/debrew.rb
@@ -1,5 +1,4 @@
require "mutex_m"
-require "debrew/irb" unless ENV["HOMEBREW_NO_READLINE"]
module Debrew
extend Mutex_m
@@ -130,17 +129,21 @@ module Debrew
menu.choice(:ignore) { return :ignore } if Ignorable === e
menu.choice(:backtrace) { puts e.backtrace }
- menu.choice(:irb) do
- puts "When you exit this IRB session, execution will continue."
- set_trace_func proc { |event, _, _, id, binding, klass|
- if klass == Raise && id == :raise && event == "return"
- set_trace_func(nil)
- synchronize { IRB.start_within(binding) }
- end
- }
-
- return :ignore
- end if Object.const_defined?(:IRB) && Ignorable === e
+ unless ENV["HOMEBREW_NO_READLINE"]
+ require "debrew/irb"
+
+ menu.choice(:irb) do
+ puts "When you exit this IRB session, execution will continue."
+ set_trace_func proc { |event, _, _, id, binding, klass|
+ if klass == Raise && id == :raise && event == "return"
+ set_trace_func(nil)
+ synchronize { IRB.start_within(binding) }
+ end
+ }
+
+ return :ignore
+ end if Ignorable === e
+ end
menu.choice(:shell) do
puts "When you exit this shell, you will return to the menu."