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
end
the 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
I'm using
robeand trying to navigate my project.robeusesenh-ruby-add-log-current-methodto resolve the current context.When I have code like:
the call to
enh-ruby-add-log-current-methodreturnsClass#methodwhen the expected result should beOne::Two::Class#methodTests, first one fails, second succeeds:
Related to #96