summaryrefslogtreecommitdiff
path: root/test/automated/ruby-mode-tests.el
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2013-06-19 02:17:56 +0400
committerDmitry Gutov <dgutov@yandex.ru>2013-06-19 02:17:56 +0400
commitd1bbba4fa5de77c3bdfb01901b697ead748a4ba6 (patch)
tree6df0d8ba9fae9ff9940f523565d4260c4d5a7c92 /test/automated/ruby-mode-tests.el
parent14dd22d2cedad0e1babcce0fea868a0c01294fa2 (diff)
downloademacs-d1bbba4fa5de77c3bdfb01901b697ead748a4ba6.tar.gz
* lisp/progmodes/ruby-mode.el (ruby-syntax-before-regexp-re):
Distinguish ternary operator tokens from slash symbol and slash char literal.
Diffstat (limited to 'test/automated/ruby-mode-tests.el')
-rw-r--r--test/automated/ruby-mode-tests.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/automated/ruby-mode-tests.el b/test/automated/ruby-mode-tests.el
index 77dd62821f7..ad13d01a674 100644
--- a/test/automated/ruby-mode-tests.el
+++ b/test/automated/ruby-mode-tests.el
@@ -124,6 +124,12 @@ VALUES-PLIST is a list with alternating index and value elements."
(ert-deftest ruby-regexp-can-be-multiline ()
(ruby-assert-state "/bars\ntees # toots \nfoos/" 3 nil))
+(ert-deftest ruby-slash-symbol-is-not-mistaken-for-regexp ()
+ (ruby-assert-state ":/" 3 nil))
+
+(ert-deftest ruby-slash-char-literal-is-not-mistaken-for-regexp ()
+ (ruby-assert-state "?/" 3 nil))
+
(ert-deftest ruby-indent-simple ()
(ruby-should-indent-buffer
"if foo