Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Prevent DirtyMinder from attempting to wrap nil values. #41

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Commits on Aug 9, 2011

  1. Prevent DirtyMinder from attempting to wrap nil values.

    Specifically, this happens when a resource is lazy-loading a property
    that includes DirtyMinder: Resource#eager_load iterates over the set of
    properties to lazy-load and calls Property#set with nil for each before
    calling Collection#lazy_load. The Property#set call blows up when given
    nil because DirtyMinder tries to add instance variables to nil—@resource
    & @Property in DirtyMinder#wrap_value—which is a frozen object and thus
    blows up.   Do the research if you don't believe me. Seriously, please
    do; I'd love to be proven wrong about this. Anyways, nil can't be
    mutated, thus I don't think anyone cares about tracking nil, so this
    fix/work-around should not impact functionality at all.
    emmanuel committed Aug 9, 2011
    Configuration menu
    Copy the full SHA
    2e58475 View commit details
    Browse the repository at this point in the history
  2. Oops, I didn't look very closely.

    My changes were based on a ref that had a Wrapper module, now it's called Hooker.
    emmanuel committed Aug 9, 2011
    Configuration menu
    Copy the full SHA
    9e38ca7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c08d222 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2011

  1. In DirtyMinder, test #nil? instead of #frozen?.

    Also outdent the private keyword, because outdented method visibility declarations are the bees knees.
    emmanuel committed Aug 16, 2011
    Configuration menu
    Copy the full SHA
    d874979 View commit details
    Browse the repository at this point in the history