# File lib/RMagick.rb, line 1081
    def []=(*args)
        if args.length == 3             # f[start,length] = [f1,f2...]
            args[2].kind_of?(Magick::Image) || is_a_image_array(args[2])
            super
            args[0] = args[0] + length if (args[0] < 0)
            args[1] = length - args[0] if (args[0] + args[1] > length)
            if args[2].kind_of?(Magick::Image)
                @scene = args[0]
            else
                @scene = args[0] + args[2].length - 1
            end
        elsif args[0].kind_of? Range    # f[first..last] = [f1,f2...]
            args[1].kind_of?(Magick::Image) || is_a_image_array(args[1])
            super
            @scene = args[0].end
        else                            # f[index] = f1
            is_a_image args[1]
            super                       # index can be negative
            @scene = args[0] < 0 ? length + args[0] : args[0]
        end
        args.last                       # return value is always assigned value
    end