fork from origin rubygems 1.4.2 source code, used for ruby 1.8.6