diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2013-02-14 09:45:33 +0400 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2013-02-14 09:45:33 +0400 |
commit | 71a048c16b1a3c8708c161b38e52155b77d0ea60 (patch) | |
tree | 84895b1fc0a34f1b914a08fd04c9fd2398f8fcf1 /test/automated/ruby-mode-tests.el | |
parent | 53ca88c478b773f2b56084442c8d17e83577f52c (diff) | |
download | emacs-71a048c16b1a3c8708c161b38e52155b77d0ea60.tar.gz |
(ruby-add-log-current-method): Improve performance at the expense
of accuracy. `ruby-block-contains-point' is relatively slow, so
only use it for method and singleton class blocks.
* test/automated/ruby-mode-tests.el
(ruby-add-log-current-method-after-inner-class): Lower
expectations: move point inside a method, initially.
Diffstat (limited to 'test/automated/ruby-mode-tests.el')
-rw-r--r-- | test/automated/ruby-mode-tests.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/automated/ruby-mode-tests.el b/test/automated/ruby-mode-tests.el index 9ee6462f6ad..c67f92e6ed9 100644 --- a/test/automated/ruby-mode-tests.el +++ b/test/automated/ruby-mode-tests.el @@ -390,11 +390,13 @@ VALUES-PLIST is a list with alternating index and value elements." | class C | class D | end - | _ + | def foo + | _ + | end | end |end") (search-backward "_") - (should (string= (ruby-add-log-current-method) "M::C")))) + (should (string= (ruby-add-log-current-method) "M::C#foo")))) (defvar ruby-block-test-example (ruby-test-string |