Upgrading Rails to Ruby 1.8.4

03 Apr 2006

I recently upgraded a Rails 1.0 (yup, I know, I'm behind the times) box from Ruby 1.8.2 to Ruby 1.8.4 and was greeted with this error when I ran my functional tests:

TypeError: can't modify frozen object
/usr/local/lib/ruby/1.8/xsd/qname.rb:78:in `name='
/usr/local/lib/ruby/1.8/soap/rpc/element.rb:118:in `set_param'
/usr/local/lib/ruby/1.8/soap/rpc/element.rb:116:in `set_param'

The fix seems to be to edit line 74 of /usr/local/lib/ruby/1.8/xsd/qname.rb and remove the call to freeze; i.e., it should look like this:

# EMPTY = QName.new.free  # OLD
EMPTY = QName.new         # NEW

Everything else seems to be working just fine; good times. Hopefully this entry will save someone some work...