Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed method always returns true #15

Open
jonblack opened this issue Dec 27, 2016 · 0 comments
Open

changed method always returns true #15

jonblack opened this issue Dec 27, 2016 · 0 comments

Comments

@jonblack
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant