branch: elpa/inf-ruby
commit af4f238ef4555521d13c5eb2fb8e818acf59d70a
Merge: bf380c13e5 7aa37e9154
Author: Dmitry Gutov <[email protected]>
Commit: GitHub <[email protected]>

    Merge pull request #99 from dgopstein/master
    
    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 "'" "\\\\'"

Reply via email to