forked from jacott/Enhanced-Ruby-Mode
-
-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
I'm using robe and trying to navigate my project.
robe uses enh-ruby-add-log-current-method to resolve the current context.
When I have code like:
module One
module Two
class Class
def method
blah # cursor here
end
end
end
endthe call to enh-ruby-add-log-current-method returns Class#method when the expected result should be One::Two::Class#method
Tests, first one fails, second succeeds:
(ert-deftest enh-ruby-nested-modules ()
(with-temp-enh-rb-string
"module One\nmodule Two\nclass Class\ndef method\n# blah\nend # method\nend # class\nend # One\nend # Two"
(search-forward "blah")
(should (equal "One::Two::Class#method" (enh-ruby-add-log-current-method)))))
(ert-deftest enh-ruby-nested-modules-compact ()
(with-temp-enh-rb-string
"class One::Two::Class\ndef method\n# blah\nend # method\nend # class"
(search-forward "blah")
(should (equal "One::Two::Class#method" (enh-ruby-add-log-current-method)))))Related to #96
Metadata
Metadata
Assignees
Labels
No labels