Skip to content

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

Merged
Anteru merged 3 commits intopygments:masterfrom
kurtmckee:issue-253-ruby-unicode
Feb 14, 2021
Merged

Support Ruby method names and operator overrides, including Unicode#1531
Anteru merged 3 commits intopygments:masterfrom
kurtmckee:issue-253-ruby-unicode

Conversation

@kurtmckee
Copy link
Copy Markdown
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
@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
Copy Markdown
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
Copy Markdown
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