Restore Ruby 1.8.x compatibility
Merge branch 'release-3.6.x'