Adding on to the if/elsif chain feels dirty. Suggestions, or leave as is?
Add number arg specs for Regexp.new
Regexp.new raises when passed in numbers
Shouldn't this implement a coercion protocol like we have in place in a lot of other places?
So maybe move to Rubinius::Type.coerce_to_regexp?
I suspect this should be string coercion, but not sure. We should also check behavior like calling to_s / to_str in the argument.
Will reopen when it's actually a decent PR 😉