Home / Programming MCQs / Ruby MCQs / Question
M
Q. Which method is used to split a string into substrings based on a regular expression in Ruby?
No solution found for this question.
Add Solution and get +2 points.
You must be Logged in to update hint/solution
What is the output of the given code? for num in 1..3 puts num for i in 1..2 puts num*i end end
Which method is used to check if a block has been passed to a Ruby method?
What is the difference between =~ and == operators?
How do you find the number of minutes between two DateTime objects in Ruby?
Which symbol is used to concatenate strings in Ruby?
What will be output for the following code?
In Ruby, which method is used to convert a string to uppercase?
Which keyword is used to define an exception class in Ruby?
What is the method used to check if a variable is defined in Ruby?
What happens if you try to yield to a block that does not exist in Ruby?
Discusssion
Login to discuss.