Wouldn't <code>assert_equal(stc.data, tmp.data)</code> catch an inplace modification of the input?