Blob Blame History Raw
diff --git a/actionview/lib/action_view/helpers/tag_helper.rb b/actionview/lib/action_view/helpers/tag_helper.rb
index f09595d..ac60cfd 100644
--- a/actionview/lib/action_view/helpers/tag_helper.rb
+++ b/actionview/lib/action_view/helpers/tag_helper.rb
@@ -179,7 +179,7 @@ def tag_option(key, value, escape)
           if value.is_a?(Array)
             value = escape ? safe_join(value, " ") : value.join(" ")
           else
-            value = escape ? ERB::Util.unwrapped_html_escape(value) : value
+            value = escape ? ERB::Util.unwrapped_html_escape(value) : value.to_s
           end
           %(#{key}="#{value.gsub(/"/, '"'.freeze)}")
         end