Skip to content
Browse files

[Excutable] Fix for ruby 1.8.7.

  • Loading branch information...
1 parent 0cc95d4 commit 21bc6d45e30551f7e58a8bcd24cc7dce1d3862ff @fabiopelosin fabiopelosin committed Aug 10, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 lib/cocoapods/executable.rb
View
10 lib/cocoapods/executable.rb
@@ -20,7 +20,8 @@ def <<(value)
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 @@ def executable(name)
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

0 comments on commit 21bc6d4

Please sign in to comment.
Something went wrong with that request. Please try again.