Skip to content

Commit c0b033a

Browse files
committed
remove "new"
1 parent 8bc870e commit c0b033a

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

insns.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ opt_string_new
962962

963963
if (recv == rb_cString &&
964964
FIXNUM_P(capa) &&
965-
vm_method_cfunc_is(GET_CFP(), cd, recv, rb_str_s_new)) {
965+
vm_method_cfunc_is(GET_CFP(), cd, recv, rb_class_new_instance_pass_kw)) {
966966
VALUE str = rb_str_new_capa_for_init(FIX2LONG(capa));
967967
TOPN(argc) = str;
968968
TOPN(argc + 1) = str;

string.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12900,7 +12900,6 @@ Init_String(void)
1290012900

1290112901
rb_include_module(rb_cString, rb_mComparable);
1290212902
rb_define_alloc_func(rb_cString, empty_str_alloc);
12903-
rb_define_singleton_method(rb_cString, "new", rb_str_s_new, -1);
1290412903
rb_define_singleton_method(rb_cString, "try_convert", rb_str_s_try_convert, 1);
1290512904
rb_define_method(rb_cString, "replace", rb_str_replace, 1);
1290612905
rb_define_method(rb_cString, "initialize_copy", rb_str_replace, 1);

0 commit comments

Comments
 (0)