Good explanation of ruby object model — mainly, 'classes are objects'?

前端 未结 5 1574
心在旅途
心在旅途 2021-02-05 18:08

I am studying the ruby object model and have some questions. I understand the idea that an object only stores instance variables, and methods are stored in the class, which an o

5条回答
  •  别跟我提以往
    2021-02-05 18:25

    Look at this article, you may find it helpful:

    The Ruby Object Model - Structure and Semantics

    Personally I learned a lot about the Ruby object model by reading about the Smalltalk one (e.g. in the Squeak documentation). And depending on how fluent you are in C, the MRI sources are quite approachable and yield the most definite answers.

提交回复
热议问题