Hooks work for 1.9.x, but not for Ruby 1.8.7. Relates to issue #148.
Please see discussion here: andreas@b10a06a.
Fix hooks for Ruby 1.8.7.
+1 as well, this causes an exception in 1.8.7
+1, broke some JRuby code (1.8 mode)
Fixed in #155, which is a duplicate of this pull request.