Rails 2.3.4/ruby1.9.1 bug undefined method `^' for "7":String 修复

rails 2.3.4 有一个bug , 自动产生代码后, (scaffold),show 内容报错

undefined method `^' for "7":String

Ruby19\lib\ruby\gems\1.9.1\gems\activesupport-2.3.4\lib\active_support\message_verifier.rb
patch 方法: 直接替换函数为patch里面的函数

def secure_compare(a, b)
result = a.length ^ b.length
for i in 0..([a.length, b.length].max - 1)
result |= a[i].to_i ^ b[i].to_i
end
result == 0
end

你可能感兴趣的:(Ruby,Rails)