@@ -276,7 +276,7 @@ sym_set_create(VALUE sym, void *data)
276276 RB_OBJ_WRITE ((VALUE )obj , & obj -> fstr , str );
277277
278278 int id = rb_str_symname_type (str , IDSET_ATTRSET_FOR_INTERN );
279- if (id < 0 ) id = ID_JUNK ;
279+ if (id < 0 ) id = ID_INTERNAL ;
280280 obj -> id = id ;
281281
282282 obj -> hashval = rb_str_hash (str );
@@ -291,7 +291,7 @@ sym_set_create(VALUE sym, void *data)
291291 VALUE static_sym = static_sym_entry -> sym ;
292292 if (static_sym == 0 ) {
293293 ID id = rb_str_symname_type (str , IDSET_ATTRSET_FOR_INTERN );
294- if (id == (ID )- 1 ) id = ID_JUNK ;
294+ if (id == (ID )- 1 ) id = ID_INTERNAL ;
295295
296296 ID nid = next_id_base ();
297297 if (nid == (ID )- 1 ) {
@@ -431,7 +431,7 @@ rb_id_attrset(ID id)
431431 scope = id_type (id );
432432 switch (scope ) {
433433 case ID_LOCAL : case ID_INSTANCE : case ID_GLOBAL :
434- case ID_CONST : case ID_CLASS : case ID_JUNK :
434+ case ID_CONST : case ID_CLASS : case ID_INTERNAL :
435435 break ;
436436 case ID_ATTRSET :
437437 return id ;
@@ -476,7 +476,7 @@ rb_id_attrset(ID id)
476476 "attrset" ,
477477 "const" ,
478478 "class" ,
479- "junk " ,
479+ "internal " ,
480480 };
481481 rb_name_error (id , "cannot make anonymous %.*s ID %" PRIxVALUE " attrset" ,
482482 (int )sizeof (id_types [0 ]), id_types [scope ], (VALUE )id );
@@ -602,66 +602,66 @@ enc_synmane_type_leading_chars(const char *name, long len, rb_encoding *enc, int
602602
603603 case '<' :
604604 switch (* ++ m ) {
605- default : return (t ) { stophere , ID_JUNK , 1 , };
606- case '<' : return (t ) { stophere , ID_JUNK , 2 , };
605+ default : return (t ) { stophere , ID_INTERNAL , 1 , };
606+ case '<' : return (t ) { stophere , ID_INTERNAL , 2 , };
607607 case '=' :
608608 switch (* ++ m ) {
609- default : return (t ) { stophere , ID_JUNK , 2 , };
610- case '>' : return (t ) { stophere , ID_JUNK , 3 , };
609+ default : return (t ) { stophere , ID_INTERNAL , 2 , };
610+ case '>' : return (t ) { stophere , ID_INTERNAL , 3 , };
611611 }
612612 }
613613
614614 case '>' :
615615 switch (* ++ m ) {
616- default : return (t ) { stophere , ID_JUNK , 1 , };
617- case '>' : case '=' : return (t ) { stophere , ID_JUNK , 2 , };
616+ default : return (t ) { stophere , ID_INTERNAL , 1 , };
617+ case '>' : case '=' : return (t ) { stophere , ID_INTERNAL , 2 , };
618618 }
619619
620620 case '=' :
621621 switch (* ++ m ) {
622- default : return (t ) { invalid , 0 , 1 , };
623- case '~' : return (t ) { stophere , ID_JUNK , 2 , };
622+ default : return (t ) { invalid , 0 , 1 , };
623+ case '~' : return (t ) { stophere , ID_INTERNAL , 2 , };
624624 case '=' :
625625 switch (* ++ m ) {
626- default : return (t ) { stophere , ID_JUNK , 2 , };
627- case '=' : return (t ) { stophere , ID_JUNK , 3 , };
626+ default : return (t ) { stophere , ID_INTERNAL , 2 , };
627+ case '=' : return (t ) { stophere , ID_INTERNAL , 3 , };
628628 }
629629 }
630630
631631 case '*' :
632632 switch (* ++ m ) {
633- default : return (t ) { stophere , ID_JUNK , 1 , };
634- case '*' : return (t ) { stophere , ID_JUNK , 2 , };
633+ default : return (t ) { stophere , ID_INTERNAL , 1 , };
634+ case '*' : return (t ) { stophere , ID_INTERNAL , 2 , };
635635 }
636636
637637 case '+' : case '-' :
638638 switch (* ++ m ) {
639- default : return (t ) { stophere , ID_JUNK , 1 , };
640- case '@' : return (t ) { stophere , ID_JUNK , 2 , };
639+ default : return (t ) { stophere , ID_INTERNAL , 1 , };
640+ case '@' : return (t ) { stophere , ID_INTERNAL , 2 , };
641641 }
642642
643643 case '|' : case '^' : case '&' : case '/' : case '%' : case '~' : case '`' :
644- return (t ) { stophere , ID_JUNK , 1 , };
644+ return (t ) { stophere , ID_INTERNAL , 1 , };
645645
646646 case '[' :
647647 switch (* ++ m ) {
648- default : return (t ) { needmore , ID_JUNK , 0 , };
648+ default : return (t ) { needmore , ID_INTERNAL , 0 , };
649649 case ']' :
650650 switch (* ++ m ) {
651- default : return (t ) { stophere , ID_JUNK , 2 , };
652- case '=' : return (t ) { stophere , ID_JUNK , 3 , };
651+ default : return (t ) { stophere , ID_INTERNAL , 2 , };
652+ case '=' : return (t ) { stophere , ID_INTERNAL , 3 , };
653653 }
654654 }
655655
656656 case '!' :
657657 switch (* ++ m ) {
658- case '=' : case '~' : return (t ) { stophere , ID_JUNK , 2 , };
658+ case '=' : case '~' : return (t ) { stophere , ID_INTERNAL , 2 , };
659659 default :
660- if (allowed_attrset & (1U << ID_JUNK )) {
661- return (t ) { needmore , ID_JUNK , 1 , };
660+ if (allowed_attrset & (1U << ID_INTERNAL )) {
661+ return (t ) { needmore , ID_INTERNAL , 1 , };
662662 }
663663 else {
664- return (t ) { stophere , ID_JUNK , 1 , };
664+ return (t ) { stophere , ID_INTERNAL , 1 , };
665665 }
666666 }
667667
@@ -702,7 +702,7 @@ rb_enc_symname_type(const char *name, long len, rb_encoding *enc, unsigned int a
702702 switch (* m ) {
703703 case '!' : case '?' :
704704 if (type == ID_GLOBAL || type == ID_CLASS || type == ID_INSTANCE ) return -1 ;
705- type = ID_JUNK ;
705+ type = ID_INTERNAL ;
706706 ++ m ;
707707 if (m + 1 < e || * m != '=' ) break ;
708708 /* fall through */
@@ -1144,7 +1144,7 @@ rb_is_local_id(ID id)
11441144int
11451145rb_is_junk_id (ID id )
11461146{
1147- return is_junk_id (id );
1147+ return is_internal_id (id );
11481148}
11491149
11501150int
0 commit comments