Sure, but I'm not sure: but will this return `nil` in case `path` is `nil` then?
What would be the return value of the method if `path` is `nil` with your syntax? It will be the value of the line before, namely `path = command.instance_eval { @path }`?

(Wanted behavior: if `path` is non-nil then I want to return the basename, but if `path` is `nil` I want to return `nil`)