@@ -253,12 +253,12 @@ static void ruby_vim_init(void);
253253# define rb_hash_new dll_rb_hash_new
254254# define rb_inspect dll_rb_inspect
255255# define rb_int2inum dll_rb_int2inum
256- # ifndef rb_intern
257- # define rb_intern dll_rb_intern
258- # endif
259- # ifdef RUBY_CONST_ID_CACHE
260- # define rb_intern2 dll_rb_intern2
261- # endif
256+
257+ // ruby.h may redefine rb_intern to use RUBY_CONST_ID_CACHE(), but that won't
258+ // work. Not using the cache appears to be the best solution.
259+ # undef rb_intern
260+ # define rb_intern dll_rb_intern
261+
262262# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
263263# if defined(DYNAMIC_RUBY_VER ) && DYNAMIC_RUBY_VER <= 18
264264# define rb_fix2int dll_rb_fix2int
@@ -394,9 +394,6 @@ static VALUE (*dll_rb_hash_new) (void);
394394static VALUE (* dll_rb_inspect ) (VALUE );
395395static VALUE (* dll_rb_int2inum ) (long );
396396static ID (* dll_rb_intern ) (const char * );
397- # ifdef RUBY_CONST_ID_CACHE
398- static ID (* dll_rb_intern2 ) (const char * , long );
399- # endif
400397# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
401398static long (* dll_rb_fix2int ) (VALUE );
402399static long (* dll_rb_num2int ) (VALUE );
@@ -597,9 +594,6 @@ static struct
597594 {"rb_inspect" , (RUBY_PROC * )& dll_rb_inspect },
598595 {"rb_int2inum" , (RUBY_PROC * )& dll_rb_int2inum },
599596 {"rb_intern" , (RUBY_PROC * )& dll_rb_intern },
600- # ifdef RUBY_CONST_ID_CACHE
601- {"rb_intern2" , (RUBY_PROC * )& dll_rb_intern2 },
602- # endif
603597# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
604598 {"rb_fix2int" , (RUBY_PROC * )& dll_rb_fix2int },
605599 {"rb_num2int" , (RUBY_PROC * )& dll_rb_num2int },
0 commit comments