Update cast.rb

Change to solve issues with array of hstore