Protip: If you use bash or zsh, you can source the ranger executable for this behavior (so the full command would be ". ranger"). If you're on fish, there is a patch pending for review, that soon will be available on master.
$ pwd
/home/grandpa
$ ranger
[ ... change directory ... ]
$ pwd
/home/grandpa
vs $ . ranger
[ ... change directory ... ]
$ pwd
/home/grandpa/src