    # File lib/chef/provider/env.rb, line 92
          def delete_element
            return false unless @new_resource.delim #no delim: delete the key
            if compare_value
              Chef::Log.debug("#{@new_resource} element '#{@new_resource.value}' does not exist")
              return true #do not delete the key
            else
              new_value =
                @current_resource.value.split(@new_resource.delim).select { |item|
                item != @new_resource.value
              }.join(@new_resource.delim)

              if new_value.empty?
                return false #nothing left here, delete the key
              else
                old_value = @new_resource.value(new_value)
                create_env
                Chef::Log.debug("#{@new_resource} deleted #{old_value} element")
                @new_resource.updated_by_last_action(true)
                return true #we removed the element and updated; do not delete the key
              end
            end
          end