Thanks that was very useful.

Is there any chance that

class Array
    def first=(v)
        self[0] = v
    end

    def last=(v)
        self[-1] = v
    end
end

might become part of the core? matz?