For example a file in active_support/core_ext/exception.rb
it started with:
module ActiveSupport
if RUBY_VERSION >= '1.9'
FrozenObjectError = RuntimeError
else
FrozenObjectError = TypeError
end
end
Then continued with class Exception code
what does it mean? What do you use FrozenObjectError, RuntimeError, and TypeError objects for? How do I know where they are initialized? why do we need these lines of code?
Could you recommend me a good book to learn about this, please?
Thanks