gpt4 book ai didi

ruby - NoMethodError : undefined method `reverse_merge'

转载 作者:数据小太阳 更新时间:2023-10-29 08:24:48 31 4
gpt4 key购买 nike

ruby-1.9.2-p180 :007 > a = {:a => 10, :b => 20}
=> {:a=>10, :b=>20}
ruby-1.9.2-p180 :008 > a.reverse_merge({:c => 30})
NoMethodError: undefined method `reverse_merge' for {:a=>10, :b=>20}:Hash
from (irb):8
from /home/sayuj/.rvm/rubies/ruby-1.9.2-p180/bin/irb:16:in `<main>'

如何解决这个NoMethodError

最佳答案

关于 ruby - NoMethodError : undefined method `reverse_merge' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7481401/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com