avdi/hammertime — pull request #2 by pagojo (2011-12-06 14:28:57+00:00)
Title: Fix for Ruby 1.9.2 and exception safety inside hammertime_raise

This patch makes safe to use components inside 'hammertime_raise' which may raise exceptions. Moreover it makes Hammertime compatible with Ruby 1.9.x.

In order to avoid failure due to deeper exceptions thrown by other components that we may use we need to make sure that during 'hammertime_raise' the original 'Kernel::raise' is used. Otherwise an exception thrown, such as a ubiquitous 'LoadError' during 'require', leads to re-entering Hammertime's own version of raise.

The results of such reentrance are not obvious and are very misleading (such as the Mutex.Lock that is manifested inside the Ruby VM when running Hammertime 0.0.2 on 1.9.x)

This fix is due to the work by Vassilis Vatikiotis (github.com/vvatikiotis) and myself.