minimal patchset for ruby 2.1
Merge pull request #2476 from skaes/initial-patches-for-ruby-2.1

minimal patchset for ruby 2.1