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)