Home / Programming MCQs / Ruby MCQs / Question
M
Q. How do you open a file in Ruby in write mode, creating it if it does not exist?
No solution found for this question.
Add Solution and get +2 points.
You must be Logged in to update hint/solution
What is the purpose of the File.exist? method in Ruby?
What is the output of the given code? boolean_1 = 77<78 puts(boolean_1)
What does the \s character class represent in a regular expression in Ruby?
What is the recommended naming convention for variables in Ruby?
What is the purpose of the extend keyword in Ruby?
What does %{Learn ruby language} represents?
How do you create a proc in Ruby?
What does the super keyword do in Ruby classes?
What is the output of the given code? counter = 1 until counter > 10 puts counter counter+=1 end
Discusssion
Login to discuss.