Update cave.rb

Fixing errors in value initialization.