Not a half truth if I clearly stated I was using Ruby 2.7 from the very beginning.
evaluating strings is something Ruby allows us to do like when people need to parse the script calls they make to any custom script or the embedded script they saved in that small box. (Only in VX ACE it gets a lot of space to write a whole paper on any topic if that makes any sense here. )
Nobody is supposed to evaluate symbols. They're frozen by nature so you'd need to make calls to an object's metaprogramming methods like instance_variable_get or instance_variable_set to do stuff.
Yet, who said you couldn't use instance_variable_get in Ruby 1.8, the one used in RMXP & RMVX?
It was Wulfo, not me, your local rubyist Kyonides.
According to the Official Ruby Documentation for Ruby 1.8.6 (not a lot different from 1.8.1 included in XP and VX):
Wulfo, you better improve your web search skills next time before coming up with a weird claim like that method is not available in Ruby 1.8.1 when actually IT IS.
EDIT 1
In your defense, I will say that none of us had foreseen the need to add an @ symbol between the : semicolon and the actual variable name.
instance_variable_get(:@a)
The same is valid for strings.
instance_variable_get("@a")
This means that in Ruby 1.8.x the code I provided might need to turn symbols into strings to add a @ symbol first and then turn them back into symbols to make it work.
EDIT 2
Nope, I tested it on RMXP. My code will work AS IS!
evaluating strings is something Ruby allows us to do like when people need to parse the script calls they make to any custom script or the embedded script they saved in that small box. (Only in VX ACE it gets a lot of space to write a whole paper on any topic if that makes any sense here. )
Nobody is supposed to evaluate symbols. They're frozen by nature so you'd need to make calls to an object's metaprogramming methods like instance_variable_get or instance_variable_set to do stuff.
Yet, who said you couldn't use instance_variable_get in Ruby 1.8, the one used in RMXP & RMVX?
It was Wulfo, not me, your local rubyist Kyonides.
According to the Official Ruby Documentation for Ruby 1.8.6 (not a lot different from 1.8.1 included in XP and VX):
Quote:instance_variable_get(symbol) => obj
Returns the value of the given instance variable, or nil if the instance variable is not set. The @ part of the variable name should be included for regular instance variables. Throws a NameError exception if the supplied symbol is not valid as an instance variable name.
Quote:instance_variable_set(symbol, obj) => obj
Sets the instance variable names by symbol to object, thereby frustrating the efforts of the class's author to attempt to provide proper encapsulation. The variable did not have to exist prior to this call.
Wulfo, you better improve your web search skills next time before coming up with a weird claim like that method is not available in Ruby 1.8.1 when actually IT IS.
EDIT 1
In your defense, I will say that none of us had foreseen the need to add an @ symbol between the : semicolon and the actual variable name.
instance_variable_get(:@a)
The same is valid for strings.
instance_variable_get("@a")
This means that in Ruby 1.8.x the code I provided might need to turn symbols into strings to add a @ symbol first and then turn them back into symbols to make it work.
EDIT 2
Nope, I tested it on RMXP. My code will work AS IS!
"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