Skip to content

Instantly share code, notes, and snippets.

@auser
Created December 6, 2008 05:19
Show Gist options
  • Save auser/32620 to your computer and use it in GitHub Desktop.
Save auser/32620 to your computer and use it in GitHub Desktop.
safe = ["-w", "-v", "-t"]
args = "-v -i 1 five"
args.size.times do |i|
if safe.include?(args[i])
args.pop
else
if args[i][0] == "-"
args.pop
args.pop
end
end
end
args == ["five"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment