norman / friendly_id

FriendlyId is the “Swiss Army bulldozer” of slugging and permalink plugins for ActiveRecord. It allows you to create pretty URL’s and work with human-friendly strings as if they were numeric ids for ActiveRecord models.
http://norman.github.io/friendly_id/
MIT License
6.13k stars 589 forks source link

Heredoc with tilde `<<~` in the `.gemspec` is incompatible with older ruby versions #987

Closed Bastes closed 2 years ago

Bastes commented 2 years ago

Hi, my team has the displeasure of working on an older ruby version (2.2.3) which does not understand all these fancy new tilde heredocs <<~, and that leads to this gem failing to install because the .gemspec contains the dreaded syntax ; since the .gemspec claims tolerating ruby as old as 2.1.0, maybe it'd be better to use the older dash heredoc <<- or to bump up the requirements to ruby 2.3.0 where that syntax was born?

What do you think?

EDIT: After inspecting the code it appears the only use of the <<~ is in the .gemspec, so I would suggest using the pre-existing <<- syntax rather than bump up the ruby version requirement.

parndt commented 2 years ago

@Bastes thanks - would you have any time or inclination to open a pull request that does exactly this please? 😄

Bastes commented 2 years ago

@parndt will do asap :)

Bastes commented 2 years ago

Here it is :)