Issue #7558 has been updated by steveklabnik (Steve Klabnik).


I went to go fix this, and I found that it's fixed in trunk: https://github.com/ruby/ruby/blob/trunk/re.c#L3254

I'm not sure if this justifies a backport into 1.9.x, but I'd be willing to write the patch if someone can remind me of the procedure.
----------------------------------------
Bug #7558: Small docs bug for Regexp::union
https://bugs.ruby-lang.org/issues/7558#change-34708

Author: alex_gaynor (Alex Gaynor)
Status: Open
Priority: Normal
Assignee: 
Category: DOC
Target version: 
ruby -v: ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin12.2.0]


The docs for Regexp::union (http://ruby-doc.org/core-1.9.3/Regexp.html#method-c-union) state:

Regexp.union(/dogs/, /cats/)        #=> /(?-mix:dogs)|(?i-mx:cats)/

This is, however, incorrect, /cats/ doesn't have the /i flag, either it should be added or the expected result should be changed.


-- 
http://bugs.ruby-lang.org/