branch: elpa/inf-ruby commit 0cfe8b2fb1ab222ed423a8e6f339d398fa32966f Author: Dmitry Gutov <dmi...@gutov.dev> Commit: Dmitry Gutov <dmi...@gutov.dev>
ruby-send-string: Use simply "binding" for eval when the process is compilation Resolves #184 --- inf-ruby.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/inf-ruby.el b/inf-ruby.el index ab47519270..868203223a 100755 --- a/inf-ruby.el +++ b/inf-ruby.el @@ -706,11 +706,17 @@ Optionally provide FILE and LINE metadata to Ruby." (format ", %S" (file-local-name file))) (when (and file line) (format ", %d" line)))) + (proc (inf-ruby-proc)) + (inf-ruby-eval-binding (if (buffer-local-value + 'inf-ruby-orig-compilation-mode + (process-buffer proc)) + "binding" + inf-ruby-eval-binding)) (code (format "eval(\"%s\", %s%s)\n" (ruby-shell--encode-string string) inf-ruby-eval-binding file-and-lineno))) - (if (or (null (process-tty-name (inf-ruby-proc))) + (if (or (null (process-tty-name proc)) (<= (string-bytes code) (or (bound-and-true-p comint-max-line-length) 1024))) ;; For Emacs < 28