Skip to main content

Advanced Topics In Ruby — Part 2 MCQs with Explanations

Practice high-yield Programming & Software Development MCQs on Advanced Topics In Ruby — Part 2 with worked academic solutions for FPSC, PPSC, NTS, NITB, PTS.

Questions
29
Difficulty Level
Exam-Level
Target Exams
FPSC, PPSC, NTS...
Estimated Time
35 mins
Exam-Level FPSC PPSC NTS NITB PTS
Verified for Commission Syllabus • Oct 14, 2026
29

Verified Practice Questions

Interactive test mode with detailed academic worked solutions

Live Progress | 0/29 answered
✓ 0 correct ✗ 0 wrong 0% score
Question 1 of 29
★ FPSC ★ PPSC

What does the term "immutability" refer to in Ruby?

Question 2 of 29
★ FPSC ★ PPSC

What is the purpose of the String#<< method in Ruby?

Question 3 of 29
★ FPSC ★ PPSC

What does the "bang" (!) operator do when appended to a method name in Ruby?

Question 4 of 29
★ FPSC ★ PPSC

What is the purpose of the catch and throw keywords in Ruby?

Question 5 of 29
★ FPSC ★ PPSC

Which method in Ruby is used to convert an object to a JSON string?

Question 6 of 29
★ FPSC ★ PPSC

What is a "predicate method" in Ruby?

Question 7 of 29
★ FPSC ★ PPSC

In Ruby, what is the purpose of the __send__ method?

Question 8 of 29
★ FPSC ★ PPSC

What does the autoload method in Ruby do?

Question 9 of 29
★ FPSC ★ PPSC

What is a "memoization" technique in Ruby?

Question 10 of 29
★ FPSC ★ PPSC

Which method is commonly used to dynamically define instance methods in Ruby?

Question 11 of 29
★ FPSC ★ PPSC

In Ruby, what is the purpose of the #method method?

Question 12 of 29
★ FPSC ★ PPSC

What is the purpose of the public_send method in Ruby?

Question 13 of 29
★ FPSC ★ PPSC

Which Ruby module is commonly used to implement the Singleton design pattern?

Question 14 of 29
★ FPSC ★ PPSC

What does the term "DSL" stand for in Ruby programming?

Question 15 of 29
★ FPSC ★ PPSC

What is a "callback" in the context of Ruby on Rails?

Question 16 of 29
★ FPSC ★ PPSC

What does the "stabby lambda" (->) syntax in Ruby represent?

Question 17 of 29
★ FPSC ★ PPSC

In Ruby, what is the purpose of the module_function keyword?

Question 18 of 29
★ FPSC ★ PPSC

What is the primary difference between module_function and extend self in Ruby?

Question 19 of 29
★ FPSC ★ PPSC

What does the send method in Ruby do?

Question 20 of 29
★ FPSC ★ PPSC

Which Ruby module is commonly used for method delegation?

Question 21 of 29
★ FPSC ★ PPSC

What is the purpose of the const_missing method in Ruby?

Question 22 of 29
★ FPSC ★ PPSC

What is a "magic comment" in Ruby?

Question 23 of 29
★ FPSC ★ PPSC

In Ruby, what is the purpose of the Module#prepend method?

Question 24 of 29
★ FPSC ★ PPSC

What does the "splat" operator (*) do when used in method definitions in Ruby?

Question 25 of 29
★ FPSC ★ PPSC

What is a "class variable" in Ruby?

Question 26 of 29
★ FPSC ★ PPSC

What is the purpose of the Module#attr_reader, Module#attr_writer, and Module#attr_accessor methods in Ruby?

Question 27 of 29
★ FPSC ★ PPSC

What is the purpose of the method_missing method in Ruby's BasicObject class?

Question 28 of 29
★ FPSC ★ PPSC

What does the term "aliasing" refer to in Ruby?

Question 29 of 29
★ FPSC ★ PPSC

What is the purpose of the Kernel#autoload method in Ruby?

✓ Link copied to clipboard
Continue Your Practice

Advance Html — Part 1

Master the next curriculum module with 40 exam-standard MCQs.

Next Practice Set →

💡 Examiner's Advisory for Programming & Software Development

In competitive commission exams (FPSC, PPSC, KPPSC, SPSC, CSS, PMS), questions are frequently phrased with distractor options designed to catch rote learners. Whenever you answer an MCQ, read the Detailed Academic Explanation and Conceptual Anchor to understand why the remaining options are incorrect.

More Modules in Programming & Software Development

View All →
📚

Study Guides

Topic summaries and syllabus breakdown

Explore Guides →
🎯

Complete Library

Search through 78,000+ verified MCQs

Browse Library →
📱

Mobile App

Offline mock tests and instant bookmarks

Get Mobile App →