Home / MCQ Bank / Computer
Computer Methods In Ruby

In Ruby, what does the `yield` keyword do in a method?

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option B • Calls the block passed to the method

Related Computer Questions

Which of the following can you place inside a namespace? 1. classes 2. functions 3. variables What is the purpose of using the delete keyword in C++ destructors? In the following C# code, which of the following statement is not correct? public class MyContainer<T> where T: class, IComparable { /* insert code here */ } What is the primary use of the plotrix package in R? Give the function prototype of the operator function which we need to define in this program so that the program has no errors. #include <iostream> #include <string> using namespace std; class Box{ int capacity; public: Box(){} Box(double capacity){ this->capacity = capacity; } }; int main(int argc, char const *argv[]) { Box b1(10); Box b2 = Box(14); if(b1 == b2){ cout<<"Equal"; } else{ cout<<"Not Equal"; } return 0; }