emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/inf-ruby 4d410007a2 169/265: Fix ruby-send-definition


From: ELPA Syncer
Subject: [nongnu] elpa/inf-ruby 4d410007a2 169/265: Fix ruby-send-definition
Date: Sat, 9 Jul 2022 21:59:23 -0400 (EDT)

branch: elpa/inf-ruby
commit 4d410007a23638339a29619e98ddb496bc400c0b
Author: Jan Path <jan.path@linux.com>
Commit: Jan Path <jan.path@linux.com>

    Fix ruby-send-definition
    
    The `ruby-end-of-defun` function doesn't work on it's own (for me at 
least), but is called by `end-of-defun` according to it's description:
    > Move point to the end of the current defun.
    > The defun begins at or after the point.  This function is called
    > by `end-of-defun'.
    
    
    ### Test case:
    ```
    def test
    |
    end
    ```
    
    *Expected*: Definition is send to irb.
    
    *Actual*: `Scan error: "Containing expression ends prematurely", 14, 14`
---
 inf-ruby.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/inf-ruby.el b/inf-ruby.el
index 14a2141b3f..214d192e99 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -393,7 +393,7 @@ Must not contain ruby meta characters.")
   "Send the current definition to the inferior Ruby process."
   (interactive)
   (save-excursion
-    (ruby-end-of-defun)
+    (end-of-defun)
     (let ((end (point)))
       (ruby-beginning-of-defun)
       (ruby-send-region (point) end))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]