Skip to content

Instantly share code, notes, and snippets.

@rennex
Created September 29, 2019 02:15
Show Gist options
  • Save rennex/2d15dd3473aeaf1615a7365243b5b9e9 to your computer and use it in GitHub Desktop.
Save rennex/2d15dd3473aeaf1615a7365243b5b9e9 to your computer and use it in GitHub Desktop.
Can't ignore "ambiguous first argument" warning
#!/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