Code Refactor in activesuport/core_ext for Hash and Array