ruby-changes:52193
From: nobu <ko1@a...>
Date: Fri, 17 Aug 2018 10:38:04 +0900 (JST)
Subject: [ruby-changes:52193] nobu:r64401 (trunk): ast.c (rb_ast_node_type): return frozen strings
nobu 2018-08-17 10:37:58 +0900 (Fri, 17 Aug 2018) New Revision: 64401 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64401 Log: ast.c (rb_ast_node_type): return frozen strings Modified files: trunk/ast.c Index: ast.c =================================================================== --- ast.c (revision 64400) +++ ast.c (revision 64401) @@ -155,7 +155,7 @@ rb_ast_node_type(VALUE self) https://github.com/ruby/ruby/blob/trunk/ast.c#L155 struct ASTNodeData *data; TypedData_Get_Struct(self, struct ASTNodeData, &rb_node_type, data); - return rb_str_new_cstr(node_type_to_str(data->node)); + return rb_fstring_cstr(node_type_to_str(data->node)); } #define NEW_CHILD(ast, node) node ? ast_new_internal(ast, node) : Qnil -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/