How do I compare two hashes?

前端 未结 14 1568
粉色の甜心
粉色の甜心 2020-11-30 00:06

I am trying to compare two Ruby Hashes using the following code:

#!/usr/bin/env ruby

require \"yaml\"
require \"active_support\"

file1 = YAML::load(File.op         


        
14条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-30 00:47

    I had the same problem and sent a pull request to rails

    • Works with deeply nested hash
    • Works with arrays of hashes

    https://github.com/elfassy/rails/commit/5f3410e04fe8c4d4745397db866c9633b80ccec6

提交回复
热议问题