I am using version 0.48 under Ubuntu 14.04, and these instructions didn't work for me. However, I was able to redock in the following way.
There are two bars at the top of the toolbar when undocked. For example I am using the Align and Distribute toolbar, and I see one bar with the close (x), minimise (-), and maximise (box) controls, with Align and Distribute (Shift+Ctrl+A) to the right. This I will call the outer bar. Below this is a bar with a lighter grey background an icon corresponding to the toolbar and Align and Distribute (Shift+Ctrl+A) written again (a second time). I will call this the inner bar.
If you click and drag with the outer bar to the top then it will maximise to the whole screen. if you click and drag to the top of the dock using the inner bar then the tool bar redocks.
Hope this helps,