In Ruby Language – About we can find this sentence:
“In Ruby, everything is an object. Every bit of information and code can be given their own properties and actions“
It is being pretty difficult to understand where the limits are. We can’t say conditional statements are objects, can we? If not, what “every bit of information” means here?
That statement is a bit of an exaggeration. Every data item in Ruby is an Object (or descendant of Object, more precisely) and
Procis one example of a bit of code which is also an object. But there are many concepts in Ruby which are not Objects, e.g. keywords, arbitrary statements, etc.However, complete statements always evaluate into an object. I think the author’s intent was to dramatically describe that there are no values, primitive or otherwise, which are not also Objects in the language.