On 05/13/2014 05:06 PM, Ryan Davis wrote:
> #to_regex isn't called anywhere. Where would it be called? For what? 
> When should something be cast to a regexp?

Actually, it is called.  From re.c:

     VALUE
     rb_check_regexp_type(VALUE re)
     {
         return rb_check_convert_type(re, T_REGEXP, "Regexp", "to_regexp");
     }

     /*
      *  call-seq:
      *     Regexp.try_convert(obj) -> re or nil
      *
      *  Try to convert <i>obj</i> into a Regexp, using to_regexp method.
      *  Returns converted regexp or nil if <i>obj</i> cannot be converted
      *  for any reason.
      *
      *     Regexp.try_convert(/re/)         #=> /re/
      *     Regexp.try_convert("re")         #=> nil
      *
      *     o = Object.new
      *     Regexp.try_convert(o)            #=> nil
      *     def o.to_regexp() /foo/ end
      *     Regexp.try_convert(o)            #=> /foo/
      *
      */
     static VALUE
     rb_reg_s_try_convert(VALUE dummy, VALUE re)
     {
         return rb_check_regexp_type(re);
     }