1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-01 01:41:01 -08:00

(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.
This commit is contained in:
Dmitry Gutov 2013-02-14 09:45:33 +04:00
parent 53ca88c478
commit 71a048c16b
4 changed files with 35 additions and 17 deletions

View file

@ -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