Ruby - Class Methods and Variables
What will be the output of this Ruby code?
class Array
def first_two
self[0..1]
end
end
arr = [10, 20, 30, 40]
puts arr.first_two.inspect