Simple, generic pooling in Ruby