[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/inf-ruby ed768ce413 004/265: Evaluate code sent via 'ruby-
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/inf-ruby ed768ce413 004/265: Evaluate code sent via 'ruby-send-region' in the same binding as the REPL. |
Date: |
Sat, 9 Jul 2022 21:59:09 -0400 (EDT) |
branch: elpa/inf-ruby
commit ed768ce4138a79780f16975e65c65ce80737303e
Author: Cornelius Mika <cornelius.mika@gmail.com>
Commit: Cornelius Mika <cornelius.mika@gmail.com>
Evaluate code sent via 'ruby-send-region' in the same binding as the REPL.
This allows for consistent access to REPL-local variables.
---
inf-ruby.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/inf-ruby.el b/inf-ruby.el
index 6a639cdf00..fff3c6c716 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -219,6 +219,8 @@ of `ruby-program-name'). Runs the hooks
`inferior-ruby-mode-hook'
"Template for irb here document terminator.
Must not contain ruby meta characters.")
+(defconst inf-ruby-eval-binding "IRB.conf[:MAIN_CONTEXT].workspace.binding")
+
(defconst ruby-eval-separator "")
(defun ruby-send-region (start end)
@@ -241,7 +243,9 @@ Must not contain ruby meta characters.")
(goto-char m)
(insert ruby-eval-separator "\n")
(set-marker m (point))))
- (comint-send-string (inf-ruby-proc) (format "eval <<'%s', nil, %S, %d\n"
term file line))
+ (comint-send-string (inf-ruby-proc) (format "eval <<'%s', %s, %S, %d\n"
+ term inf-ruby-eval-binding
+ file line))
(comint-send-region (inf-ruby-proc) start end)
(comint-send-string (inf-ruby-proc) (concat "\n" term "\n"))))
- [nongnu] elpa/inf-ruby 0697315485 109/265: Merge pull request #52 from abicky/support-dir-without-traiing-slash, (continued)
- [nongnu] elpa/inf-ruby 0697315485 109/265: Merge pull request #52 from abicky/support-dir-without-traiing-slash, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 451aa1d858 145/265: Merge pull request #71 from jasonko/master, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 46917f463c 151/265: Integrate with projectile-rails-server-mode, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 4962bb076e 141/265: inf-ruby-console-patterns-alist: Accept predicate function in cars, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby c59d7d0a23 134/265: inf-ruby-console-default: Prioritize console.rb if it exists, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby e91b349e4f 168/265: Hook up inf-ruby-auto-exit inside inf-ruby-auto-enter, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 106972ded1 165/265: Touch up docstrings and rename MODE-VAR to MODE, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 0ed06255ec 179/265: Allow running multiple ruby processes, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 536a68528c 184/265: Make ruby-last-ruby-buffer buffer-local, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby d1e6e9e669 003/265: Bugfix: Escape the completion seed., ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby ed768ce413 004/265: Evaluate code sent via 'ruby-send-region' in the same binding as the REPL.,
ELPA Syncer <=
- [nongnu] elpa/inf-ruby 68a7ad32fa 006/265: Bugfix: Don't stall Emacs when there is no valid completion output., ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 06e2b1e29e 008/265: Bugfix: Complete only when point is at a top-level prompt., ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby ec0d30ad19 019/265: Merge pull request #5 from lewang/quote_fix, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby f52d33ec43 016/265: Transform an unneded case statement into an if statement., ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 28c24e3e70 021/265: Merge pull request #7 from lewang/patch-1, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby f2e7cc8313 025/265: Restrict a Windows-specific fix to be applied only on Windows platforms., ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 415eb2dfd8 018/265: allow quoted parameters to run-ruby, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby fd0eccaedf 020/265: use `eval-after' to bind keys instead of hooking, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 910658e1f3 029/265: Use 'ruby-backward-sexp' instead of 'backward-sexp', ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 4f4f0ccdf7 026/265: Version 2.2.4, ELPA Syncer, 2022/07/09