Skip to content

Instantly share code, notes, and snippets.

@headius
Forked from enebo/blurgh
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save headius/ccc382dc6c54c21fa4e3 to your computer and use it in GitHub Desktop.
Save headius/ccc382dc6c54c21fa4e3 to your computer and use it in GitHub Desktop.
# ignores kwargs
if (rest)
postIndex = args.length - postCount;
elsif (preCount + optLength <= args.length)
postIndex = preCount + optLength
else
optCount = args.length - preCount - postCount
postIndex = preCount + optCount
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment