Last active
July 30, 2017 15:06
-
-
Save picatz/1353b072dfdbfeb06050d555cb6d478d to your computer and use it in GitHub Desktop.
ARGV Error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARGV << "example" | |
i = ARGV.index("example") | |
i # is 0 | |
result = i + 1 | |
# expect result to be 1 | |
# but get error | |
# undefined method '+' for Nil (compile-time type is (Int32 | Nil)) | |
# | |
# i + 1 | |
# ^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment