Skip to content

changed method always returns true #15

@jonblack

Description

@jonblack

The changed? method returns true if and only if update_type is not equal to :no_change:

def changed?
  if update_type == :no_change
    false
  else
    true
  end
end

However, update_type can never be that value:

def update_type
  case raw_update_type
    when '<'
      :sent
    when '>'
      :recv
    when 'c'
      :change
    when 'h'
      :hard_link
    when '.'
      :no_update
    when '*'
      :message
  end
end

I suspect it should be if update_type == :no_update as :no_change appears to apply only to changes to attributes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions