Ruby 1.8 compatibility fixes.
Merge branch 'feature/restore-caching' into wdtk