matteosister / php-curry

Curried functions for PHP
61 stars 1 forks source link

Unable to curry a function that uses `func_get_args` #3

Closed webNeat closed 8 years ago

webNeat commented 8 years ago

Hello, I am having an issue when currying a function that uses func_get_args. Here is the failing test case:

public function testCurryFunctionUsingFuncGetArgs() {
    $fn = function() {
        return implode(', ', func_get_args());
    };

    $curried = F\curry($fn);

    $this->assertEquals('foo, bar', $fn('foo', 'bar'));
    $this->assertEquals('foo, bar', $curried('foo', 'bar'));
}

The first assertion goes fine while the second is failling.

Thanks

matteosister commented 8 years ago

@webNeat should we close this?

webNeat commented 8 years ago

Yes, this is solved 7da718312e13860778fa6f76330f0dd1e4eb2a9d