bfoz / geometry

Geometric primitives for Ruby
https://rubygems.org/gems/geometry
BSD 2-Clause "Simplified" License
47 stars 18 forks source link

gemspec: explicitly set required_ruby_version to >= 2.x #70

Closed yaauie closed 10 years ago

yaauie commented 10 years ago

Since this gem contains syntax that was not available in 1.9.x builds of ruby, explicitly state the required ruby version in the gemspec to avoid installation on builds that are incompatible.

The offending syntax was introduced in fb3fb6d7b and is included in the 6.3 release to rubygems.org.

bfoz commented 10 years ago

Thanks for catching this. Although, at this point, I'm not sure it's worth the gemspec-pollution given that 1.9.3 is already unmaintained, and will be EOL'd soon.

yaauie commented 10 years ago

I caught this when a previously-working project that still runs on 1.9.3 and depended on geometry ~> 6.0 release got upgraded to geometry 6.3 & suddenly SyntaxErrors. While I'm completely in favour of adopting new syntax features as they become available (and are useful), some care should be taken to avoid unnecessary pains in consuming the libraries we maintain; adding an explicit directive stating requirements, then, is not pollution, but rather a preemptive elimination of frustration.

bfoz commented 10 years ago

Considering that 1.9.x got another patch release, you're probably right that this is a good idea. I went ahead and created a new commit instead of bothering with the merge, even though it probably would have worked just fine. Thanks!