We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac9b219 commit 38c6e18Copy full SHA for 38c6e18
ext/erb/erb.c
@@ -68,9 +68,9 @@ optimized_escape_html(VALUE str)
68
}
69
70
static VALUE
71
-cgiesc_escape_html(VALUE self, VALUE str)
+erb_escape_html(VALUE self, VALUE str)
72
{
73
- StringValue(str);
+ str = rb_convert_type(str, T_STRING, "String", "to_s");
74
75
if (rb_enc_str_asciicompat_p(str)) {
76
return optimized_escape_html(str);
@@ -80,13 +80,6 @@ cgiesc_escape_html(VALUE self, VALUE str)
80
81
82
83
-static VALUE
84
-erb_escape_html(VALUE self, VALUE str)
85
-{
86
- str = rb_funcall(str, rb_intern("to_s"), 0);
87
- return cgiesc_escape_html(self, str);
88
-}
89
-
90
void
91
Init_erb(void)
92
0 commit comments