mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
fix warning about signature of respond_to? on 2.4
This commit is contained in:
parent
d99eb05e81
commit
b69fbcaf5e
7 changed files with 12 additions and 12 deletions
|
@ -338,7 +338,7 @@ class Pry
|
|||
undef =~
|
||||
|
||||
# Check whether String responds to missing methods.
|
||||
def respond_to_missing?(name, include_all = false)
|
||||
def respond_to_missing?(name, include_all=false)
|
||||
''.respond_to?(name, include_all)
|
||||
end
|
||||
|
||||
|
|
|
@ -186,8 +186,8 @@ module Pry::Config::Behavior
|
|||
end
|
||||
end
|
||||
|
||||
def respond_to_missing?(key, include_private=false)
|
||||
key?(key) or @default.respond_to?(key) or super(key, include_private)
|
||||
def respond_to_missing?(key, include_all=false)
|
||||
key?(key) or @default.respond_to?(key) or super(key, include_all)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -23,8 +23,8 @@ class Pry::LastException < BasicObject
|
|||
end
|
||||
end
|
||||
|
||||
def respond_to_missing?(name, include_private = false)
|
||||
@e.respond_to?(name)
|
||||
def respond_to_missing?(name, include_all=false)
|
||||
@e.respond_to?(name, include_all)
|
||||
end
|
||||
|
||||
#
|
||||
|
|
|
@ -461,8 +461,8 @@ class Pry
|
|||
|
||||
# @param [String, Symbol] method_name
|
||||
# @return [Boolean]
|
||||
def respond_to?(method_name)
|
||||
super or @method.respond_to?(method_name)
|
||||
def respond_to?(method_name, include_all=false)
|
||||
super or @method.respond_to?(method_name, include_all)
|
||||
end
|
||||
|
||||
# Delegate any unknown calls to the wrapped method.
|
||||
|
|
|
@ -35,8 +35,8 @@ class Pry::Output
|
|||
@boxed_io.__send__(name, *args, &block)
|
||||
end
|
||||
|
||||
def respond_to_missing?(*a)
|
||||
@boxed_io.respond_to?(*a)
|
||||
def respond_to_missing?(m, include_all=false)
|
||||
@boxed_io.respond_to?(m, include_all)
|
||||
end
|
||||
|
||||
def decolorize_maybe(str)
|
||||
|
|
|
@ -332,7 +332,7 @@ class Pry::Slop
|
|||
# Override this method so we can check if an option? method exists.
|
||||
#
|
||||
# Returns true if this option key exists in our list of options.
|
||||
def respond_to_missing?(method_name, include_private = false)
|
||||
def respond_to_missing?(method_name, include_all=false)
|
||||
options.any? { |o| o.key == method_name.to_s.chop } || super
|
||||
end
|
||||
|
||||
|
|
|
@ -150,8 +150,8 @@ class Pry
|
|||
wrapped.send(method_name, *args, &block)
|
||||
end
|
||||
|
||||
def respond_to?(method_name)
|
||||
super || wrapped.respond_to?(method_name)
|
||||
def respond_to?(method_name, include_all=false)
|
||||
super || wrapped.respond_to?(method_name, include_all)
|
||||
end
|
||||
|
||||
# Retrieve the source location of a module. Return value is in same
|
||||
|
|
Loading…
Reference in a new issue