ice-cube-ruby / ice_cube

Ruby Date Recurrence Library - Allows easy creation of recurrence rules and fast querying
MIT License
2.41k stars 358 forks source link

Not compatible anymore with older ruby versions. #533

Closed alagos closed 5 months ago

alagos commented 2 years ago

After these changes, I'm getting this error using ruby 2.4:

lib/ice_cube/schedule.rb:307: syntax error, unexpected ']'
        ences.last : occurrences[-n..]

lib/ice_cube/schedule.rb:448: syntax error, unexpected keyword_rescue, expecting keyword_end
                rescue StopIteration
                      ^

It would be good to update the gemspec and define what's the required ruby version for this gem.

pacso commented 5 months ago

Some of the unsupported versions of Ruby (and/or Rails) will still work with this gem. It would be unhelpful to forcefully prevent it being used with those.

However, we only test the gem against currently active and supported versions of Ruby/Rails.

alagos commented 5 months ago

Some of the unsupported versions of Ruby (and/or Rails) will still work with this gem

That doesn't make any sense. I am using one of those unsupported versions (ruby 2.4/rails 4.2) and I can tell you, this gem isn't working for those because of syntax errors. At this point, in a project with my stack you could freely add gem 'ice_cube' to the Gemfile and 0.16.4 version will be installed, regardless that version doesn't work there. I'm not asking to support unsupported versions changing the code to be compatible with them, but stop allowing newer versions to be installed in unsupported stacks. That's an usual practice in pretty much any popular gem.