Skip to content

Commit 4fab4cf

Browse files
committed
[ruby/pathname] Fix Init and InitVM
ruby/pathname@2b63d44453
1 parent 6fd108d commit 4fab4cf

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pathname.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1313,6 +1313,8 @@ path_f_pathname(VALUE self, VALUE str)
13131313

13141314
#include "pathname_builtin.rbinc"
13151315

1316+
static void init_ids(void);
1317+
13161318
/*
13171319
*
13181320
* Pathname represents the name of a file or directory on the filesystem,
@@ -1503,8 +1505,13 @@ Init_pathname(void)
15031505
rb_ext_ractor_safe(true);
15041506
#endif
15051507

1508+
init_ids();
15061509
InitVM(pathname);
1510+
}
15071511

1512+
void
1513+
InitVM_pathname(void)
1514+
{
15081515
rb_cPathname = rb_define_class("Pathname", rb_cObject);
15091516
rb_define_method(rb_cPathname, "initialize", path_initialize, 1);
15101517
rb_define_method(rb_cPathname, "freeze", path_freeze, 0);
@@ -1596,7 +1603,7 @@ Init_pathname(void)
15961603
}
15971604

15981605
void
1599-
InitVM_pathname(void)
1606+
init_ids(void)
16001607
{
16011608
#undef rb_intern
16021609
id_at_path = rb_intern("@path");

0 commit comments

Comments
 (0)