Skip to content

Commit c160f6d

Browse files
committed
Merge pull request #44 from github/reason-to-s
Call to_s on the reason field before converting to a hash
2 parents bee9b5b + 96b569f commit c160f6d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/github-pages-health-check/printer.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ def initialize(health_check)
1212

1313
def simple_string
1414
require 'yaml'
15-
health_check.to_hash.to_yaml.sub(/\A---\n/, "").gsub(/^:/, "")
15+
hash = health_check.to_hash
16+
hash[:reason] = hash[:reason].to_s if hash[:reason]
17+
hash.to_yaml.sub(/\A---\n/, "").gsub(/^:/, "")
1618
end
1719

1820
def pretty_print

0 commit comments

Comments
 (0)