Adding code for ruby version