Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaks ruby-add-log-current-method #96

Closed
dgutov opened this issue May 9, 2016 · 9 comments
Closed

Breaks ruby-add-log-current-method #96

dgutov opened this issue May 9, 2016 · 9 comments
Assignees

Comments

@dgutov
Copy link

dgutov commented May 9, 2016

Take this example, move point to bar:

class Test
  def foo
    bar
  end
end

(ruby-add-log-current-method) should return "Test#foo". It returns "Test" instead.

I'd be happy if (enh-ruby-add-log-current-method) returned the expected value, but that doesn't happen either.

Originally reported as dgutov/robe#47 (comment).

@zenspider zenspider self-assigned this Nov 15, 2016
@zenspider
Copy link
Owner

Can you point me at some doco or something for this? Esp a contract of some sort.

What calls this function and why? I wouldn't expect a ruby-* function to work in ERM.

@dgutov
Copy link
Author

dgutov commented Nov 15, 2016

add-log-current-defun does. robe-context does too.

I wouldn't expect a ruby-* function to work in ERM.

What about enh-ruby-add-log-current-method, then?

@dgutov
Copy link
Author

dgutov commented Nov 15, 2016

Can you point me at some doco or something for this?

ruby-add-log-current-method has a docstring with examples.

@zenspider
Copy link
Owner

I think I just fixed this for most forms.

@dgutov
Copy link
Author

dgutov commented Apr 18, 2017

The lack of support for class << self is unfortunate: we do use this form, for instance. Another problem is that it does not return fully qualified module names. Example:

module A
  module B
    class C
      def foo
        _
      end
    end
  end
end

(enh-ruby-add-log-current-method) returns "C#foo" instead of "A::B::C#foo".

@zenspider
Copy link
Owner

Failing tests would be more actionable...

@dgutov
Copy link
Author

dgutov commented Apr 19, 2017

Isn't the above description unambiguous? I hope you realize I'm not using this major mode myself.

@zenspider
Copy link
Owner

Closing in favor of #156.

Repository owner locked and limited conversation to collaborators Jan 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants