It seems that Delayed Rendering may be valid. You have probably seen this with applications such as Excel, Word, Outlook, or almost any large drawing program. You copy, and when you close the application, you say something like "you have placed a large amount of data on the clipboard, do you want to make it available to other programs?". This is because the copy was executed with "deferred rendering" and the data is not actually on the clipboard. The clipboard has only empty descriptors, and if / when something really asks to paste (especially exotic or expensive formats such as WKS1, SYLK, EMF, HTML, etc.), the Application should produce it in place. Therefore, when shutting down, these applications really just take care of these unfulfilled obligations, because they will not respond to WM_RenderFormat messages after they leave. I expect your ruby โโenvironment to use lazy rendering for even simple formats like CF_TEXT, and instead of updating the clipboard with full data (which many applications do quietly), they just dump it. Or perhaps they leave zero pens there. Running the old XP clipboard viewer will show you the difference between a really empty clipboard and one that thinks it has text (TEXT appears in the list of available formats), but actually just has zero descriptors.
source share