branch: elpa/inf-ruby
commit ebceb3816587af260c527a8c73ef65599c7fab94
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>
inf-ruby-prompt-format: Fix not to match single operator chars
Like "/".
---
inf-ruby.el | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/inf-ruby.el b/inf-ruby.el
index ca09750fda..573b711dff 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -36,17 +36,18 @@
"Which Ruby implementation to use if none is specified.")
(defconst inf-ruby-prompt-format
- (mapconcat
- #'identity
- '("\\(^%s> .*\\)" ; Simple
- "\\(^(rdb:1)\\)" ; Debugger
- "\\(^\\(irb([^)]+)" ; IRB default
- "\\(\[[0-9]+\] \\)?[Pp]ry ?([^)]+)" ; Pry
- "\\(jruby-\\|JRUBY-\\)?[1-9]\\.[0-9]\\.[0-9]+\\(-?p?[0-9]+\\)?" ; RVM
- "^rbx-head" ; RVM continued
- ;; Statement and nesting counters, common to the last four.
- "\\) ?[0-9:]* ?%s *\\)")
- "\\|")
+ (concat
+ (mapconcat
+ #'identity
+ '("\\(^%s> .*\\)" ; Simple
+ "\\(^(rdb:1)\\)" ; Debugger
+ "\\(^\\(irb([^)]+)" ; IRB default
+ "\\(\[[0-9]+\] \\)?[Pp]ry ?([^)]+)" ; Pry
+ "\\(jruby-\\|JRUBY-\\)?[1-9]\\.[0-9]\\.[0-9]+\\(-?p?[0-9]+\\)?" ; RVM
+ "^rbx-head\\)") ; RVM continued
+ "\\|")
+ ;; Statement and nesting counters, common to the last four.
+ " ?[0-9:]* ?%s *\\)")
"Format string for the prompt regexp pattern.
Two placeholders: first char in the Simple prompt, and the last
graphical char in all other prompts.")