Faveod / arel-extensions

Extending Arel
MIT License
142 stars 24 forks source link

case: fix inheritance for Arel versions >= 10 #29

Closed fsateler closed 4 years ago

fsateler commented 4 years ago

The version comparison was being done on a string, and lexical sorting if 7 is after 1, thus resulting in not inheriting from Arel::Nodes::Case, and then we get errors like:

NoMethodError: undefined method `eq' for #<ArelExtensions::Nodes::Case:0x00005578f1ac1a10>

Fix that by using the Gem::Version class.

Fixes #28