mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
use ternary conditional instead of inline if/else
This commit is contained in:
parent
08b76a555b
commit
55c524da3d
1 changed files with 1 additions and 1 deletions
|
@ -374,7 +374,7 @@ class Pry
|
||||||
# pry.pop_prompt # => prompt1
|
# pry.pop_prompt # => prompt1
|
||||||
# pry.pop_prompt # => prompt1
|
# pry.pop_prompt # => prompt1
|
||||||
def pop_prompt
|
def pop_prompt
|
||||||
if prompt_stack.size > 1 then prompt_stack.pop else prompt end
|
prompt_stack.size > 1 ? prompt_stack.pop : prompt
|
||||||
end
|
end
|
||||||
|
|
||||||
if RUBY_VERSION =~ /1.9/ && RUBY_ENGINE == "ruby"
|
if RUBY_VERSION =~ /1.9/ && RUBY_ENGINE == "ruby"
|
||||||
|
|
Loading…
Reference in a new issue