Ruby - Inheritance
Consider this Ruby code:
What is the output?
class Parent
def process(data)
data.map { |x| x * 2 }
end
end
class Child < Parent
def process(data)
super(data.select { |x| x.even? })
end
end
p Child.new.process([1,2,3,4])What is the output?
