Small docs bug for Regexp::union
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.
Updated by steveklabnik (Steve Klabnik) over 9 years ago
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.
Updated by zzak (Zachary Scott) over 9 years ago
For what it's worth, here is the original patch: https://github.com/ruby/ruby/commit/cf9bdd0
Not sure what revision that is though. And seeing as how it was originally committed 5 years ago, I'm surprised this bug still exists.
Steve, only documentation I found on backporting: https://bugs.ruby-lang.org/projects/ruby/wiki/HowToBackport