branch: elpa/inf-ruby
commit 910658e1f30e6120a6cbd06bc49487c678b7b0c5
Author: Dmitry Gutov <[email protected]>
Commit: Cornelius Mika <[email protected]>

    Use 'ruby-backward-sexp' instead of 'backward-sexp'
    
    Ruby-mode doesn't customize 'forward-sexp-function', but it does have its 
own
    forward/backward-sexp commands. With this change, you can put the point 
after
    a class definition or after the end of a do/end block, press `C-x C-e`, and 
it
    will send the whole definition or block to the repl.
---
 inf-ruby.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/inf-ruby.el b/inf-ruby.el
index 971223c1de..a38f5946b2 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -261,7 +261,7 @@ Must not contain ruby meta characters.")
 (defun ruby-send-last-sexp ()
   "Send the previous sexp to the inferior Ruby process."
   (interactive)
-  (ruby-send-region (save-excursion (backward-sexp) (point)) (point)))
+  (ruby-send-region (save-excursion (ruby-backward-sexp) (point)) (point)))
 
 (defun ruby-send-block ()
   "Send the current block to the inferior Ruby process."

Reply via email to