From dc308ee37bd6595554a860950d64a70c9475cfbd Mon Sep 17 00:00:00 2001 From: zzak Date: Thu, 26 Sep 2013 16:07:10 +0000 Subject: [PATCH] * re.c: [DOC] arguments of Regexp::union receive #to_regexp [Bug #8205] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ re.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index d4ff94d61f..6143191645 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri Sep 27 01:05:00 2013 Zachary Scott + + * re.c: [DOC] arguments of Regexp::union receive #to_regexp [Bug #8205] + Fri Sep 27 00:39:27 2013 Zachary Scott * struct.c: [DOC] grammar of ArgumentError in Struct.new [Bug #8936] diff --git a/re.c b/re.c index 9954805a9a..a7074d8282 100644 --- a/re.c +++ b/re.c @@ -3276,6 +3276,9 @@ rb_reg_s_union(VALUE self, VALUE args0) * Regexp.union("skiing", "sledding") #=> /skiing|sledding/ * Regexp.union(["skiing", "sledding"]) #=> /skiing|sledding/ * Regexp.union(/dogs/, /cats/i) #=> /(?-mix:dogs)|(?i-mx:cats)/ + * + * Note: the arguments for ::union will try to be converted into a regular + * expression literal via #to_regexp. */ static VALUE rb_reg_s_union_m(VALUE self, VALUE args)