Easy
What does the following method return?
Author: Olivier MillaStatus: PublishedQuestion passed 20 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
Similar QuestionsMore questions about Ruby
0
How to add a getter and setter method to a class in Ruby0
Which of the following two Ruby code snippets will return a hash with the same keys and values?0
Write a Ruby program that prints the first 100 prime numbers.0
Install the latest version of Ruby0
What is the output of the following Ruby code?
class Foo
def initialize(z)
@z = z
end
def x
@z * 2
end
end
foo = Foo.new(1)
puts foo.x