activeadmin / arbre

An Object Oriented DOM Tree in Ruby
MIT License
761 stars 74 forks source link

Drop dependency on ruby2_keywords #578

Closed Earlopain closed 7 months ago

Earlopain commented 7 months ago

Now that Ruby < 2.7 is not supported (#345) this isn't needed anymore

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.32%. Comparing base (729a91d) to head (e0368b9).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #578 +/- ## ========================================== - Coverage 94.34% 94.32% -0.03% ========================================== Files 17 17 Lines 460 458 -2 ========================================== - Hits 434 432 -2 Misses 26 26 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Earlopain commented 7 months ago

Hi, the dependency is not needed anymore because ruby2_keyword methods are defined by ruby natively from 2.7 and up. It's only necesseary for downward compatibility.

$ rbenv local 2.6.10
$ irb
irb(main):001:0> RUBY_VERSION
=> "2.6.10"
irb(main):002:0> Module.respond_to?(:ruby2_keywords, true)
=> false

$ rbenv local 2.7.8
$ irb
irb(main):001:0> RUBY_VERSION
=> "2.7.8"
irb(main):002:0> Module.respond_to?(:ruby2_keywords, true)
=> true