rspec/rspec-expectations — pull request #518 by myronmarston (2014-04-04 06:27:22+00:00)
Title: Clone matchers when composing

This is the dup'ing solution we talked about in #515. Note that I wound up using `clone` instead, because it preserves singleton behavior and that's super important for matchers defined via the custom matcher DSL (as the `define` block is eval'd in the context of the singleton class...so it's all singleton behavior).

`clone` is also quite performant; it takes about 1/1000 of a ms in my benchmark.

/cc @danielfone @JonRowe @xaviershay