Ruby Advanced Quiz 1
q
L
quizLearn
Select your answers and check your results. Use Reset to start again.
Practice Pronunciation (Merriam-Webster)
Search Google
Search
Navigation
TypeScript Beginner Quizzes
Quiz 1,
Quiz 2,
Quiz 3,
Quiz 4,
Quiz 5
TypeScript Intermediate Quizzes
Quiz 1,
Quiz 2,
Quiz 3,
Quiz 4,
Quiz 5
TypeScript Advanced Quizzes
Quiz 1,
Quiz 2,
Quiz 3,
Quiz 4,
Quiz 5
Swift Beginner Quizzes
Quiz 1,
Quiz 2,
Quiz 3,
Quiz 4,
Quiz 5
Swift Intermediate Quizzes
Quiz 1,
Quiz 2,
Quiz 3,
Quiz 4,
Quiz 5
Swift Advanced Quizzes
Quiz 1,
Quiz 2,
Quiz 3,
Quiz 4,
Quiz 5
Ruby Beginner Quizzes
Quiz 1,
Quiz 2,
Quiz 3,
Quiz 4,
Quiz 5
Ruby Intermediate Quizzes
Quiz 1,
Quiz 2,
Quiz 3,
Quiz 4,
Quiz 5
Ruby Advanced Quizzes
Quiz 1,
Quiz 2,
Quiz 3,
Quiz 4,
Quiz 5
R Beginner Quizzes
Quiz 1,
Quiz 2,
Quiz 3,
Quiz 4,
Quiz 5
R Intermediate Quizzes
Quiz 1,
Quiz 2,
Quiz 3,
Quiz 4,
Quiz 5
R Advanced Quizzes
Quiz 1,
Quiz 2,
Quiz 3,
Quiz 4,
Quiz 5
C++ Beginner Quizzes
Quiz 1,
Quiz 2,
Quiz 3,
Quiz 4,
Quiz 5
C++ Intermediate Quizzes
Quiz 1,
Quiz 2,
Quiz 3,
Quiz 4,
Quiz 5
C++ Advanced Quizzes
Quiz 1,
Quiz 2,
Quiz 3,
Quiz 4,
Quiz 5
Bash Beginner Quizzes
Quiz 1,
Quiz 2,
Quiz 3,
Quiz 4,
Quiz 5
Bash Intermediate Quizzes
Quiz 1,
Quiz 2,
Quiz 3,
Quiz 4,
Quiz 5
Bash Advanced Quizzes
Quiz 1,
Quiz 2,
Quiz 3,
Quiz 4,
Quiz 5
Quiz 1
1. Which method is used to hook into class inheritance to perform actions when a class is subclassed?
inherited
subclassed
extended
2. What does the `binding` method return?
The current class instance
An object representing the execution context
The local variables only
3. Which method is used to remove an object from the garbage collector's reach?
GC.collect
ObjectSpace.define_finalizer
ObjectSpace.garbage_collect
4. What is the primary purpose of a `Refinement` in Ruby?
Localized monkey-patching
Global method modification
Performance optimization
5. Which method allows you to define a method on a specific instance (singleton class)?
class_eval
define_singleton_method
instance_exec
6. How does `prepend` differ from `include` in the method lookup chain?
Prepend is for modules, include for classes
Prepend searches after the class
Prepend searches before the class
7. What does `method_missing` return when it is overridden to handle unknown method calls?
Can return anything, usually method result or super
Always returns nil
Must raise NoMethodError
8. Which object represents the 'singleton class' of an instance?
MetaClass
Eigenclass
Singleton
9. What is the purpose of `BasicObject`?
A faster version of Object
A deprecated class
An object with minimal methods
10. Which method would you use to convert a method into an object?
method(:name)
to_proc(:name)
bind(:name)
Previous
Check Quiz
Reset
Next
Other
Timer
00:00
Start
Stop
Reset
Vocabulary Quiz
Score: 0
Reset Score
Submit Answer
Next Word
Spin the Wheel
SPIN
Promo's
Explore More
C# Documentation
C# Tutorials