open file in read mode only
fix Ruby 1.9 version match