Skip to content
Browse files

Merge pull request #135 from nerdyc/master

Workaround to allow Thor/Bundler to work under MacRuby
  • Loading branch information...
2 parents 23b32a2 + 677b1e0 commit 7416806146f252c589cfa0f7c154393bc498090a @sferik sferik committed
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/thor/task.rb
View
5 lib/thor/task.rb
@@ -65,10 +65,9 @@ def required_options
@required_options ||= options.map{ |_, o| o.usage if o.required? }.compact.sort.join(" ")
end
- # Given a target, checks if this class name is not a private/protected method.
+ # Given a target, checks if this class name is a public method.
def public_method?(instance) #:nodoc:
- collection = instance.private_methods + instance.protected_methods
- (collection & [name.to_s, name.to_sym]).empty?
+ !(instance.public_methods & [name.to_s, name.to_sym]).empty?
end
def sans_backtrace(backtrace, caller) #:nodoc:

0 comments on commit 7416806

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