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

Use refinements to support Ruby <= 2.6 Range#minmax #151

Merged
merged 1 commit into from
Nov 13, 2020

Conversation

marcandre
Copy link
Contributor

Cleans up the code and cleaner detection.

See this discussion

@marcandre marcandre self-assigned this Nov 13, 2020
@marcandre marcandre force-pushed the minmax branch 2 times, most recently from e244bc2 to 0bfc76f Compare November 13, 2020 22:23
@mergify mergify bot merged commit f5c6354 into rubocop:master Nov 13, 2020
@marcandre marcandre deleted the minmax branch November 14, 2020 04:10
Earlopain added a commit to Earlopain/rubocop-ast that referenced this pull request Aug 3, 2024
It was added for a bug in Ruby <= 2.7
The minimum version now is 2.7 so it is not needed anymore.

rubocop#151

```
irb(main):001:0> RUBY_VERSION
=> "2.6.10"
irb(main):002:0> Range.instance_method(:minmax).owner != ::Range
=> true

irb(main):002> RUBY_VERSION
=> "2.7.8"
irb(main):003> Range.instance_method(:minmax).owner != ::Range
=> false
```
koic pushed a commit that referenced this pull request Aug 3, 2024
It was added for a bug in Ruby <= 2.7
The minimum version now is 2.7 so it is not needed anymore.

#151

```
irb(main):001:0> RUBY_VERSION
=> "2.6.10"
irb(main):002:0> Range.instance_method(:minmax).owner != ::Range
=> true

irb(main):002> RUBY_VERSION
=> "2.7.8"
irb(main):003> Range.instance_method(:minmax).owner != ::Range
=> false
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant