1
0
Fork 0
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:
Lee Jarvis 2011-05-19 18:18:21 +01:00
parent 08b76a555b
commit 55c524da3d

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"