summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-13 09:59:22 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-13 09:59:22 +0000
commitfa8b08b4248d66a172369f4654fec9bdba8c748f (patch)
treeb1217f07f36c92fca08b5f5ee720dc5596de17ff /io.c
parent83a01e6f529b80a876508b9501b64e8f1f1414da (diff)
downloadbundler-fa8b08b4248d66a172369f4654fec9bdba8c748f.tar.gz
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
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index 944beb7d60..32629165cf 100644
--- a/io.c
+++ b/io.c
@@ -13034,7 +13034,7 @@ Init_IO(void)
rb_output_fs = Qnil;
rb_define_hooked_variable("$,", &rb_output_fs, 0, rb_str_setter);
- rb_default_rs = rb_fstring_cstr("\n"); /* avoid modifying RS_default */
+ rb_default_rs = rb_fstring_lit("\n"); /* avoid modifying RS_default */
rb_gc_register_mark_object(rb_default_rs);
rb_rs = rb_default_rs;
rb_output_rs = Qnil;