Skip to content

Commit

Permalink
Remove Range#minmax refinement (#307)
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
Earlopain authored Aug 3, 2024
1 parent 0fa1c3d commit 6e5e64b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 20 deletions.
1 change: 0 additions & 1 deletion lib/rubocop/ast.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
require 'set'

require_relative 'ast/ext/range'
require_relative 'ast/ext/range_min_max'
require_relative 'ast/node_pattern/method_definer'
require_relative 'ast/node_pattern'
require_relative 'ast/node/mixin/descendence'
Expand Down
18 changes: 0 additions & 18 deletions lib/rubocop/ast/ext/range_min_max.rb

This file was deleted.

1 change: 0 additions & 1 deletion lib/rubocop/ast/node_pattern/node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ class NodePattern
class Node < ::Parser::AST::Node
extend Forwardable
include ::RuboCop::AST::Descendence
using Ext::RangeMinMax

MATCHES_WITHIN_SET = %i[symbol number string].to_set.freeze
private_constant :MATCHES_WITHIN_SET
Expand Down

0 comments on commit 6e5e64b

Please sign in to comment.