Move sorts instantiation to constructor in order
Move sorts instantiation to constructor in order

to maintain thread safety and prevent a potential race condition from
memoization.

Before this commit, freezing the search object ivar in the SortLink
class to verify that it is not being mutated was raising errors due to
this.

@ernie, @radar, let me know if this isn’t a good idea.

Mario245/ransack,nagyt234/ransack,roman-franko/ransack,johan--/ransack,avit/ransack,mariorcardoso/ransack,guilleva/ransack,AndrewSwerlick/ransack,Eric-Guo/ransack,martndemus/ransack,vaski/ransack,laserlemon/ransack,activerecord-hackery/ransack,outstand/ransack,reinteractive/ransack