Support Ruby 2.2.0

ref: https://bugs.ruby-lang.org/issues/10314 and  #1902