Skip to content

Commit

Permalink
minor cleanup to whereami command
Browse files Browse the repository at this point in the history
  • Loading branch information
banister committed Jan 2, 2013
1 parent 3da2c4d commit dcdea09
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/pry/commands/whereami.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ def location
"#{@file} @ line #{@line} #{@method && @method.name_with_owner}"
end

def nothing_to_do?
opts.quiet? && (internal_binding?(target) || !code?)
end

def process
if opts.quiet? && (internal_binding?(target) || !code?)
if nothing_to_do?
return
elsif internal_binding?(target)
if target_self == TOPLEVEL_BINDING.eval("self")
Expand Down

0 comments on commit dcdea09

Please sign in to comment.