Permalink
Browse files

Fix warnings

  • Loading branch information...
rf- committed Jul 2, 2012
1 parent b9a016d commit 44466b8bdac92a523d806b79e7a0469530003ef0
Showing with 4 additions and 7 deletions.
  1. +0 −3 lib/pry.rb
  2. +2 −2 lib/pry/core_extensions.rb
  3. +1 −1 lib/pry/default_commands/introspection.rb
  4. +1 −1 lib/pry/module_candidate.rb
View
@@ -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 @@ def __binding_impl__
# 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 @@ def all_modules
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 Candidate
: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

0 comments on commit 44466b8

Please sign in to comment.