2 つのハッシュを比較して、どの値が一致するかを判断したいと考えています。例えば:
hash1 = {
"hash1_key_a" => 1,
"hash1_key_b" => 2
}
hash2 = {
"hash2_key_a" => 1,
"hash2_key_b" => 3,
"hash2_key_c" => 4
}
# The method here should display the matching keys & values,
# and then delete them from their hashes. For example:
puts "#{hash1_key_a};#{hash2_key_a};1" # 1 is representing the referral we should
# put in for the value
誰かが私を正しい方向に導くことができますか?