Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. #!/usr/bin/ruby -w
  2. require "warning"
  3.  
  4. def foo(regexp)
  5. end
  6.  
  7. Warning.ignore(:ambiguous_slash)
  8.  
  9. foo /why you do dis/
  10. # still prints:
  11. # warningtest.rb:9: warning: ambiguous first argument; put parentheses or a space even after `/' operator
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement