mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
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
This commit is contained in:
parent
83a01e6f52
commit
fa8b08b424
13 changed files with 37 additions and 39 deletions
2
error.c
2
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue