Skip to content

Commit

Permalink
Use safe-navigation operator where applicable
Browse files Browse the repository at this point in the history
  • Loading branch information
p0deje committed Mar 9, 2019
1 parent cca8329 commit 76af8b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rb/lib/selenium/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def stop
stop_process if @process
poll_for_shutdown

@log_file.close if defined?(@log_file)
@log_file&.close
end

def webdriver_url
Expand Down
2 changes: 1 addition & 1 deletion rb/lib/selenium/webdriver/common/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def stop_server
end

def process_running?
defined?(@process) && @process && @process.alive?
defined?(@process) && @process&.alive?
end

def process_exited?
Expand Down

0 comments on commit 76af8b9

Please sign in to comment.