JLimperg/rcite — Issue #12: Loading a style more than once does not work
Author: JLimperg
Created: 2012-02-11 02:02:15+00:00
State: open
Labels: bug

`Processor#load_style` uses `Kernel#require` to load styles, therefore loading a style file more than once to overwrite the existing style does not work. Because the file is already required, Ruby assumes it doesn't have to load it again for every call to `require` except the first one.

To fix this issue, `Processor#load_style` should first check if the class defined in the style file is already loaded. If so, it should remove all methods and class variables from this class and use `Kernel#load` to add the new ones. This would still leave constants untouched, but, given that no reasonable person will load the same file multiple times anyway, should solve the problem well enough.