Backport #7558

Small docs bug for Regexp::union

Added by Alex Gaynor over 1 year ago. Updated over 1 year ago.

[ruby-core:50874]
Status:Third Party's Issue
Priority:Normal
Assignee:Usaku NAKAMURA

Description

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.

History

#1 Updated by Steve Klabnik over 1 year 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.

#2 Updated by Zachary Scott over 1 year 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

#3 Updated by Usaku NAKAMURA over 1 year ago

  • Tracker changed from Bug to Backport
  • Project changed from ruby-trunk to Backport93
  • Category deleted (doc)
  • Status changed from Open to Assigned
  • Assignee set to Usaku NAKAMURA

#4 Updated by Usaku NAKAMURA over 1 year ago

  • Status changed from Assigned to Third Party's Issue

seems it's only on ruby-doc.org.

Also available in: Atom PDF