*** lisp/progmodes/ruby-mode.el.orig 2013-12-06 11:17:04.000000000 -0600 --- lisp/progmodes/ruby-mode.el 2013-12-06 11:16:21.000000000 -0600 *************** *** 807,815 **** This command assumes the character after point is an opening delimiter." (let ((n 1) (c (string-to-char term)) ! (re (if expand ! (concat "[^\\]\\(\\\\\\\\\\)*\\([" term "]\\|\\(#{\\)\\)") ! (concat "[^\\]\\(\\\\\\\\\\)*[" term "]")))) (while (and (re-search-forward re end no-error) (if (match-beginning 3) (ruby-forward-string "}{" end no-error nil) --- 807,818 ---- This command assumes the character after point is an opening delimiter." (let ((n 1) (c (string-to-char term)) ! (re (concat "[^\\]\\(\\\\\\\\\\)*\\(" ! (if (string= term "^") ;[^] is not a valid regexp ! "\\^" ! (concat "[" term "]")) ! (when expand "\\|\\(#{\\)") ! "\\)"))) (while (and (re-search-forward re end no-error) (if (match-beginning 3) (ruby-forward-string "}{" end no-error nil) *** test/automated/ruby-mode-tests.el.orig 2013-12-06 11:17:04.000000000 -0600 --- test/automated/ruby-mode-tests.el 2013-12-06 11:16:21.000000000 -0600 *************** *** 658,667 **** (ert-deftest ruby-forward-string-accepts-single-delimiters () (ruby-forward-string-should-move-to "/foo/bar" "/" 6) (ruby-forward-string-should-move-to "|foo|bar" "|" 6) ! (ruby-forward-string-should-move-to "-foo-bar" "-" 6)) ! ! (ert-deftest ruby-forward-string-accepts-carets () ! :expected-result :failed (ruby-forward-string-should-move-to "^foo^bar" "^" 6)) (ert-deftest ruby-forward-string-scans-the-shortest-match () --- 658,664 ---- (ert-deftest ruby-forward-string-accepts-single-delimiters () (ruby-forward-string-should-move-to "/foo/bar" "/" 6) (ruby-forward-string-should-move-to "|foo|bar" "|" 6) ! (ruby-forward-string-should-move-to "-foo-bar" "-" 6) (ruby-forward-string-should-move-to "^foo^bar" "^" 6)) (ert-deftest ruby-forward-string-scans-the-shortest-match ()