Created
September 29, 2019 02:15
-
-
Save rennex/2d15dd3473aeaf1615a7365243b5b9e9 to your computer and use it in GitHub Desktop.
Can't ignore "ambiguous first argument" warning
This file contains 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
#!/usr/bin/ruby -w | |
require "warning" | |
def foo(regexp) | |
end | |
Warning.ignore(:ambiguous_slash) | |
foo /why you do dis/ | |
# still prints: | |
# warningtest.rb:9: warning: ambiguous first argument; put parentheses or a space even after `/' operator |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment