From fa8b08b4248d66a172369f4654fec9bdba8c748f Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 13 Oct 2018 09:59:22 +0000 Subject: Prefer `rb_fstring_lit` over `rb_fstring_cstr` The former states explicitly that the argument must be a literal, and can optimize away `strlen` on all compilers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'error.c') diff --git a/error.c b/error.c index ab42c5dcdb..fc3022f854 100644 --- a/error.c +++ b/error.c @@ -1840,7 +1840,7 @@ syntax_error_initialize(int argc, VALUE *argv, VALUE self) { VALUE mesg; if (argc == 0) { - mesg = rb_fstring_cstr("compile error"); + mesg = rb_fstring_lit("compile error"); argc = 1; argv = &mesg; } -- cgit v1.2.3