Skip to content

Commit 3a4af7c

Browse files
authored
Merge pull request jekyll#38 from jekyll/no-ask-empty-on-fixnum
Merge pull request 38
2 parents 7a69ed5 + 4bce497 commit 3a4af7c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/jekyll-gist/gist_tag.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def determine_arguments(input)
4747

4848
def gist_script_tag(gist_id, filename = nil)
4949
url = "https://gist.github.com/#{gist_id}.js"
50-
url = "#{url}?file=#{filename}" unless filename.empty?
50+
url = "#{url}?file=#{filename}" unless filename.to_s.empty?
5151
"<script src=\"#{url}\"> </script>"
5252
end
5353

@@ -74,7 +74,7 @@ def fetch_raw_code(gist_id, filename = nil)
7474
return code_from_api(gist_id, filename) if ENV["JEKYLL_GITHUB_TOKEN"]
7575

7676
url = "https://gist.githubusercontent.com/#{gist_id}/raw"
77-
url = "#{url}/#{filename}" unless filename.empty?
77+
url = "#{url}/#{filename}" unless filename.to_s.empty?
7878
uri = URI(url)
7979
Net::HTTP.start(uri.host, uri.port,
8080
use_ssl: uri.scheme == 'https',

0 commit comments

Comments
 (0)