liquidm/ext — pull request #6 by jwroblewski (2013-12-18 12:26:21+00:00)
Title: WeightedSelector: Return nil when no elements available

Previously, exception was raised in this condition:

TypeError:
no implicit conversion from nil to integer
# ./lib/liquid/weighted_selector.rb:38:in `pick_one_with_index'