evil-matchit icon indicating copy to clipboard operation
evil-matchit copied to clipboard

Does not support Ruby’s endless methods

Open tofuya opened this issue 1 year ago • 1 comments

Problem Description:

evil-matchit seems to not support ruby’s endless method. I confirmed that it fails with the following test case. Endless methods are a new feature in Ruby 3.0 that allows developers to write more concise and expressive code.

class Bar
  def foo(abc) = bar +
                 baz

  def self.bar =
    123 +
    4

  def foo(...) = z

  def request_params = {
    headers: request_headers,
    body: request_body
  }

  def self.foo(
        baz,
        bar
      ) =
    what
end

Expected behavior:

The expected behavior is to jump between the definition line and the end of the endless method.

Actual behavior:

Pressing key % does not jump to the correct corresponding method or block.

Environment

Emacs Version: GNU Emacs 29.1 (build 2, aarch64-apple-darwin21.6.0) Terminal Emacs Evil-Matchit Version: 3.0.2 Evil Version: 1.15.0 Ruby: 3.1.2

tofuya avatar Sep 26 '23 01:09 tofuya