Parens are required before * when used for splatting.

https://stackoverflow.com/questions/41821628/ruby-how-can-i-kill-warning-interpreted-as-argument-prefix
This commit is contained in:
Oleg Pudeyev 2017-06-03 16:59:08 -04:00
parent 43ab0b2f48
commit e6157c21b9

View File

@ -25,7 +25,7 @@ module ToRegex
# @option options [true,false] :lang /foo/[nesu]
def to_regex(options = {})
if args = as_regexp(options)
::Regexp.new *args
::Regexp.new(*args)
end
end