method
handle_argument_error?
v2_6_3 -
Show latest stable
- Class:
Bundler::Thor::Command
handle_argument_error?(instance, error, caller)protected
No documentation available.
# File lib/bundler/vendor/thor/lib/thor/command.rb, line 97
def handle_argument_error?(instance, error, caller)
not_debugging?(instance) && (error.message =~ /wrong number of arguments/ || error.message =~ /given \d*, expected \d*/) && begin
saned = sans_backtrace(error.backtrace, caller)
# Ruby 1.9 always include the called method in the backtrace
saned.empty? || (saned.size == 1 && RUBY_VERSION >= "1.9")
end
end