patches for ruby-1.9.3-p545

@skaes ported from 1.9.3-p484