Wrong first argument in system
ruby, system
Solution
Need to use splat operator to convert the array to method parameters:
system *%W[git rev-list HEAD...#{remote}/master --count]
Problem
In a git repository. I want to get the number of commits against remote `origin`'s master branch: ``` remote = 'origin' system %W[git rev-list HEAD...#{remote}/master --count] ``` This will result in `ArgumentError: wrong first argument`. But `git rev-list HEAD...#{remote}/master --count` works. what's wrong with my first argument?