branch: elpa/inf-ruby
commit 7aa37e9154d9439688f4dff30ceb4479d9bd9dd2
Author: Dan Gopstein <[email protected]>
Commit: Dan Gopstein <[email protected]>
Add ruby-send-line function
---
inf-ruby.el | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/inf-ruby.el b/inf-ruby.el
index 5d2fee342e..745ff77252 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -553,6 +553,13 @@ Then switch to the process buffer."
(widen)
(ruby-send-region (point-min) (point-max))))
+(defun ruby-send-line ()
+ "Send the current line to the inferior Ruby process."
+ (interactive)
+ (save-restriction
+ (widen)
+ (ruby-send-region (point-at-bol) (point-at-eol))))
+
(defun ruby-escape-single-quoted (str)
"Escape single quotes, double quotes and newlines in STR."
(replace-regexp-in-string "'" "\\\\'"