Using data.code.to_i like a true Rubyist in plugins/gist_code.rb. Heh. #438

This commit is contained in:
Parker Moore 2013-03-05 23:39:27 +01:00
parent 51905b6a90
commit 407a242f2d
1 changed files with 2 additions and 2 deletions

View File

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