add compability for ruby greater than or equal to 2.0