Merge ruby 2 compatibility fix