I have a base class with child classes that override a method that takes multiple arguments.
class Parent
def foo *bar
end
end
class Child < Parent
def foo bar, baz
end
end
This works fine. However, suppose there is a method foobar in Parent that calls foo:
def foobar *foo_args
foo foo_args
end
This raises a ArgumentError when called on a Child instance because foo_args is one single array, while Child.new.foo expects two objects. Is there a way around this?