Yes. This worked. But not `rake rails:freeze:edge`.
Anyhow, I've found the problem. It was the ruby version. Together with
rubygems-1.3.1, rake-0.8.3 and rails-2.2.2
the listed ruby versions behaved as follows:
ruby-1.8.6-p111 OK
ruby-1.8.7-p0 failed
ruby-1.8.7-p72 OK
So I guess you run ruby-1.8.7 with a patchlevel greater than zero.