nonsequitur / inf-ruby

218 stars 69 forks source link

Add support for TRAMP to ruby-send-* and ruby-load-file #169

Closed pritambaral closed 1 year ago

pritambaral commented 1 year ago

We already support running inferior ruby processes over remote connections via TRAMP. But the ruby-send-* functions use the full file name when sending code over, which includes the remote path. This renders ruby's code introspection useless because source locations use filenames that ruby cannot understand.

For example, if sending code from a file /tmp/example.rb on TRAMP remote /ssh:remote:, the ruby source locations end up as /ssh:remote:/tmp/example.rb.

This change makes inf-ruby strip the remote path when sending filenames to the inferior ruby process. For compatibility with Emacs versions older than 26.1, it avoids using (file-local-name).

dgutov commented 1 year ago

Thanks!