Commit 21bc6d45 authored by Fabio Pelosin's avatar Fabio Pelosin

[Excutable] Fix for ruby 1.8.7.

parent 0cc95d4e
......@@ -20,7 +20,8 @@ module Pod
def executable(name)
bin = `which #{name}`.strip
define_method(name) do |command, should_raise = false|
base_method = "base_" << name.to_s
define_method(base_method) do |command, should_raise|
if bin.empty?
raise Informative, "Unable to locate the executable `#{name}'"
end
......@@ -45,10 +46,15 @@ module Pod
output
end
define_method(name) do |command|
send(base_method, command, false)
end
define_method(name.to_s + "!") do |command|
send(name, command, true)
send(base_method, command, true)
end
private name
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment