update to 2.1.3 ruby
merge with changes for ruby 2.x