use ternary conditional instead of inline if/else
This commit is contained in:
parent
08b76a555b
commit
55c524da3d
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue