Feature #2765: Fix for ruby < 1.9