4 ms·
How to Check If a Variable Is Defined with Ruby's defined? Keyword
- WaffleIronMaker 3y agoI didn't know about this! It's interesting that "local-variable" and "instance-variable" are hyphenated, but "class variable" contains a space. I wonder why that is?
- software_writer 3y agoI'm not sure why, but all the source values are listed here: https://github.com/ruby/ruby/blob/1cc700907d3ad3368272488a6f8960f2336bf26e/iseq.c#L3247 https://github.com/ruby/ruby/blob/1cc700907d3ad3368272488a6f... Maybe someone knowledgeable in the underpinnings of Ruby will explain why "class variable" was not hyphenated.