Bird
0
0

In Ruby, which of the following is not considered an object?

easy📝 Conceptual Q11 of 15
Ruby - Basics and Runtime
In Ruby, which of the following is not considered an object?
ANumbers like 5
BStrings like "hello"
CBooleans like true
DVariables themselves
Step-by-Step Solution
Solution:
  1. Step 1: Understand Ruby's object model

    In Ruby, everything you work with directly, like numbers, strings, and booleans, are objects.
  2. Step 2: Differentiate variables from objects

    Variables are names or references pointing to objects, but they themselves are not objects.
  3. Final Answer:

    Variables themselves are not objects -> Option D
  4. Quick Check:

    Variables are references, not objects [OK]
Quick Trick: Remember: variables point to objects, they aren't objects themselves [OK]
Common Mistakes:
  • Thinking variables are objects
  • Confusing object instances with variable names
  • Assuming booleans are not objects

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Ruby Quizzes