use ternary conditional instead of inline if/else

This commit is contained in:
Lee Jarvis 2011-05-19 18:18:21 +01:00
parent 08b76a555b
commit 55c524da3d
1 changed files with 1 additions and 1 deletions

View File

@ -374,7 +374,7 @@ class Pry
# pry.pop_prompt # => prompt1
# pry.pop_prompt # => prompt1
def pop_prompt
if prompt_stack.size > 1 then prompt_stack.pop else prompt end
prompt_stack.size > 1 ? prompt_stack.pop : prompt
end
if RUBY_VERSION =~ /1.9/ && RUBY_ENGINE == "ruby"