merge r42260 upstream ruby/ruby#369