egonSchiele / contracts.ruby

Contracts for Ruby.
http://egonschiele.github.com/contracts.ruby
BSD 2-Clause "Simplified" License
1.44k stars 82 forks source link

* Update implementation & spec to be 3.0 compatible #295

Closed PikachuEXE closed 3 years ago

PikachuEXE commented 3 years ago

Mainly around the breaking behaviour change about keyword arguments

PikachuEXE commented 3 years ago

@egonSchiele Please merge this and release 0.17 once you think it's ready

egonSchiele commented 3 years ago

nice change 👍

egonSchiele commented 3 years ago

0.17 published

PikachuEXE commented 3 years ago

Just realized 0.17 is released instead of 0.17.0 Oops

mscwilson commented 3 years ago

Hello, we had some trouble with keyword arguments for our gem (Snowplow Ruby tracker). Unfortunately, we've had to remove Contracts completely.

Because we need to support Ruby 2 and 3, it's not possible to select a Contracts version in the gemspec that will work for both. It's alright locally with a conditional statement in the gemspec, but that doesn't work with RubyGems.

Just wanted to let you know in case this affects others too.

PikachuEXE commented 3 years ago

Yup I wish I can support both. But it's too difficult for me.

Feel free to try to make it compatible with both 2.7 & 3.x. I think that's this gem is supporting (especially for Ruby 2 > 3 transition).