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

Support Ruby method names and operator overrides, including Unicode #1531

Merged
merged 3 commits into from
Feb 14, 2021

Conversation

kurtmckee
Copy link
Contributor

Fixes #253

This patch contains these changes:

  • Add 50+ new Ruby tests for method name/operator override matching.
  • Unicode method names are now supported (Ruby: Non-ASCII Method Names Not Recognised #253).
  • = method name postfixes are now supported.
  • These operator overrides are now supported:
    <, <=, ! !@, ~@, !, !=, !~, =~
  • The <> "operator" override is removed. It appears that this was
    a typo in the regular expression (<=?> should have been <=>?).

Syntax verified with https://docs.ruby-lang.org/en/2.7.0/syntax/methods_rdoc.html

Fixes pygments#253

This patch contains these changes:

* Add 50+ new Ruby tests for method name/operator override matching.
* Unicode method names are now supported (pygments#253).
* `=` method name postfixes are now supported.
* These operator overrides are now supported:
  `<`, `<=`, `!` `!@`, `~@`, `!`, `!=`, `!~`, `=~`
* The `<>` "operator" override is removed. It appears that this was
  a typo in the regular expression (`<=?>` should have been `<=>?`).

Syntax verified with https://docs.ruby-lang.org/en/2.7.0/syntax/methods_rdoc.html
pygments/lexers/ruby.py Outdated Show resolved Hide resolved
@Anteru Anteru self-assigned this Sep 4, 2020
@Anteru Anteru added the changelog-update Items which need to get mentioned in the changelog label Sep 4, 2020
@Anteru Anteru added this to the 2.7 milestone Sep 4, 2020
@kurtmckee
Copy link
Contributor Author

kurtmckee commented Sep 4, 2020 via email

@Anteru Anteru modified the milestones: 2.7, 2.8 Sep 12, 2020
@Anteru Anteru merged commit a2579d3 into pygments:master Feb 14, 2021
@Anteru
Copy link
Collaborator

Anteru commented Feb 14, 2021

Thanks a lot, merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ruby: Non-ASCII Method Names Not Recognised
3 participants