Convert to integer before comparing. data.code is String

This commit is contained in:
Roman Yepishev 2012-02-21 11:07:45 +02:00
parent ef8392e267
commit 7ebc0a0d8b

View File

@ -82,7 +82,7 @@ module Jekyll
https.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new raw_uri.request_uri
data = https.request request
if data.code != 200
if Integer(data.code) != 200
raise RuntimeError, "Gist replied with #{data.code} for #{gist_url}"
end
data = data.body