require 'benchmark' require 'rubygems' valid = Benchmark.measure do Gem::Version.new '1.11111111111111111111111' end puts 'Valid version time:' puts valid invalid = Benchmark.measure do begin Gem::Version.new '1.11111111111111111111111.' rescue end end puts 'Invalid version time:' puts invalid n = (valid.real - invalid.real).abs if 0.1 < n then puts 'You are vulnerable to CVE-2013-XXXX.' else puts 'You are NOT vulnerable to CVE-2013-XXXX.' end