Is everything in ruby an object? Does this include Fixnums?
Is everything in ruby an object? Does this include Fixnum s?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Depends on what you mean by “everything”.
Fixnums are, as the others have demonstrated. Classes also are, as instances of classClass. Methods, operators and blocks aren’t, but can be wrapped by objects (Proc). Simple assignment is not, and can’t. Statements likewhilealso aren’t and can’t. Comments obviously also fall in the latter group.Most things that actually matter, i.e. that you would wish to manipulate, are objects (or can be wrapped in objects).