Fix warnings
This commit is contained in:
parent
b9a016d160
commit
44466b8bda
|
@ -10,9 +10,6 @@ class Pry
|
|||
# The default hooks - display messages when beginning and ending Pry sessions.
|
||||
DEFAULT_HOOKS = Pry::Hooks.new.add_hook(:before_session, :default) do |out, target, _pry_|
|
||||
next if _pry_.quiet?
|
||||
# ensure we're actually in a method
|
||||
file = target.eval('__FILE__')
|
||||
|
||||
_pry_.run_command("whereami --quiet", "", target)
|
||||
end
|
||||
|
||||
|
|
|
@ -73,14 +73,14 @@ class Object
|
|||
# it has the nice property that we can memoize this check.
|
||||
begin
|
||||
# instance_eval sets the default definee to the object's singleton class
|
||||
instance_eval *binding_impl_method
|
||||
instance_eval(*binding_impl_method)
|
||||
|
||||
# If we can't define methods on the Object's singleton_class. Then we fall
|
||||
# back to setting the default definee to be the Object's class. That seems
|
||||
# nicer than having a REPL in which you can't define methods.
|
||||
rescue TypeError
|
||||
# class_eval sets the default definee to self.class
|
||||
self.class.class_eval *binding_impl_method
|
||||
self.class.class_eval(*binding_impl_method)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ class Pry
|
|||
begin
|
||||
doc << "\nCandidate #{v+1}/#{module_object.number_of_candidates}: #{candidate.file} @ #{candidate.line}:\n\n"
|
||||
doc << candidate.doc
|
||||
rescue Pry::RescuableException => ex
|
||||
rescue Pry::RescuableException
|
||||
doc << "No documentation found.\n"
|
||||
next
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@ class Pry
|
|||
:strip_leading_whitespace]
|
||||
|
||||
def_delegators :@wrapper, *to_delegate
|
||||
private *to_delegate
|
||||
private(*to_delegate)
|
||||
|
||||
# @raise [Pry::CommandError] If `rank` is out of bounds.
|
||||
# @param [Pry::WrappedModule] wrapper The associated
|
||||
|
|
Loading…
Reference in New Issue