Issue #7558 has been reported by alex_gaynor (Alex Gaynor). ---------------------------------------- Bug #7558: Small docs bug for Regexp::union https://bugs.ruby-lang.org/issues/7558 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.
on 2012-12-13 16:27
on 2012-12-13 16:42
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.
on 2012-12-13 17:28
Issue #7558 has been updated by zzak (Zachary Scott). 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 ---------------------------------------- Bug #7558: Small docs bug for Regexp::union https://bugs.ruby-lang.org/issues/7558#change-34712 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.
on 2012-12-25 01:50
Issue #7558 has been updated by usa (Usaku NAKAMURA). Status changed from Assigned to Third Party's Issue seems it's only on ruby-doc.org. ---------------------------------------- Backport #7558: Small docs bug for Regexp::union https://bugs.ruby-lang.org/issues/7558#change-35051 Author: alex_gaynor (Alex Gaynor) Status: Third Party's Issue Priority: Normal Assignee: usa (Usaku NAKAMURA) Category: Target version: 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.
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.