`
山雨欲来风满楼
  • 浏览: 57140 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

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
1
0
分享到:
评论
1 楼 pochonlee 2010-11-04  
谢了,刚好遇到这个问题。

相关推荐

Global site tag (gtag.js) - Google Analytics