activerecord::base code

Nope. Did you try writing a little script to see if it's equivalent?

[ "A", "B", "C" ].each do |c|
    class c < StandardError
    end
end

... doesn't work. Run it to see why.

But this does work;

[ "A", "B", "C" ].each do |c|
    eval "class #{c} < StandardError
    end"
end

... maybe
:wink: