branch: elpa/inf-ruby
commit fd8d392fefd1d99eb58fc597d537d0d7df29c334
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>
ruby-print-result: Fallback to inf-ruby-buffer
---
inf-ruby.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/inf-ruby.el b/inf-ruby.el
index 02c491fdf0..5c7d5fc450 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -460,7 +460,8 @@ Must not contain ruby meta characters.")
"Print the result of the last evaluation in the current buffer."
(let ((proc (inf-ruby-proc)))
(insert
- (with-current-buffer (inf-ruby-buffer)
+ (with-current-buffer (or (inf-ruby-buffer)
+ inf-ruby-buffer)
(while (not (and comint-last-prompt
(goto-char (car comint-last-prompt))
(looking-at inf-ruby-first-prompt-pattern)))