prawnpdf/prawn — pull request #635 by dmarkow (2014-01-14 22:20:39+00:00)
Title: Properly copy graphics states

GraphicState's initializer was properly using `dup` to copy `color_space` from `previous_state`, but it was not using `dup` on the `dash` attribute, keeping `dash` tied to the previous state's `dash`.

Also added an `initialize_copy` method to make sure those two attributes are properly copied whenever we `dup`/`clone` a graphic state.

Added specs for both updates.

---

This somewhat helps with #473 because it makes sure the graphics state is truly immune to any changes after setting a repeater. However, for the time being, a repeater still has to be defined before **anything else** to ensure a clean slate.