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

Make Node#numeric_type? aware of rational and complex literals #213

Conversation

koic
Copy link
Member

@koic koic commented Nov 6, 2021

This PR makes Node#numeric_type? aware of complex and rational literals.
These literals could be treated as numeric.

42r.is_a?(Numeric)  # => true
42i.is_a?(Numeric)  # => true
42ri.is_a?(Numeric) # => true

This PR makes `Node#numeric_type?` aware of complex and rational literals.
These literals could be treated as numeric.

```ruby
42r.is_a?(Numeric)  # => true
42i.is_a?(Numeric)  # => true
42ri.is_a?(Numeric) # => true
```
@marcandre marcandre merged commit 1446501 into rubocop:master Nov 7, 2021
@marcandre
Copy link
Contributor

Thanks! Released in 1.13.0

@koic koic deleted the make_numeric_type_predicate_aware_of_rational_and_complex branch November 7, 2021 23:59
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.

None yet

2 participants