10-12-2022, 08:00 PM
In a previous post I had informed you of a bug present in Ruby 3.0. At least I thought it was only there and nowhere else. Sadly, I recently found out that is not the case.
Ever since version 3.0, the core development team thought it was nice to implement their Primitive pseudo variable in a couple of default methods. What I mean here is that instead of simply defining a CRuby function and then link it to Ruby via a rb_define_method call, they pretend to temporarily create a Primitive "class" that simply calls the C function directly. The function gets all the obvious parameters from Ruby plus a hidden context variable.
Why is that a HUGE problem for developers?
The answer is pretty easy. Standalone applications like MKXP or HiddenChest are now unable to call a simple file and directory collector method like Dir#glob or Dir#[] ever again.
How's that even possible?
Well, now such applications would need to include probably most of Ruby's files that had neverĀ been required in the 2.x series or even before that. Why? Because the irb or ruby interpreter's console (a MS-DOS like shell) still can access those Dir singleton methods.
I know Matz and his collaborators had been talking about implementing some special __C__ variable, now known as Primitive, to let us call CRuby functions directly. The thing is that instead of being an advantage, it has become a real nuisance for developers!
Ever since version 3.0, the core development team thought it was nice to implement their Primitive pseudo variable in a couple of default methods. What I mean here is that instead of simply defining a CRuby function and then link it to Ruby via a rb_define_method call, they pretend to temporarily create a Primitive "class" that simply calls the C function directly. The function gets all the obvious parameters from Ruby plus a hidden context variable.
Why is that a HUGE problem for developers?
The answer is pretty easy. Standalone applications like MKXP or HiddenChest are now unable to call a simple file and directory collector method like Dir#glob or Dir#[] ever again.
How's that even possible?
Well, now such applications would need to include probably most of Ruby's files that had neverĀ been required in the 2.x series or even before that. Why? Because the irb or ruby interpreter's console (a MS-DOS like shell) still can access those Dir singleton methods.
I know Matz and his collaborators had been talking about implementing some special __C__ variable, now known as Primitive, to let us call CRuby functions directly. The thing is that instead of being an advantage, it has become a real nuisance for developers!
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE