> the symbol will resolve to the same object_id every time across systems and processes. If you spin up irb and type :foo.object_id you will see 1092508.
object_id for symbols is not consistent across processes.
You're getting 1092508 consistently not because it's :foo but because it's the next object_id available for a symbol after all the ones created during IRB startup.
Well dang... that is interesting and not what I expected. So from this I can infer that it also changes if a symbol is garbage collected now. So has the implementation of Object.send changed in Ruby 2.2+ as well? The latest copy of the code I have looked at is 1.9.3.
object_id for symbols is not consistent across processes.
You're getting 1092508 consistently not because it's :foo but because it's the next object_id available for a symbol after all the ones created during IRB startup.