diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-08 16:03:53 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-08 16:03:53 +0000 |
| commit | 4acc6e259886bd3adb3ad0e085d948bae9bb598e (patch) | |
| tree | a5aa955f7dba211bc9b99d679bb639fcbbfd9775 | |
| parent | 902114679373b9a5f344dc83276550bdccbd7bc1 (diff) | |
| download | ruby-4acc6e259886bd3adb3ad0e085d948bae9bb598e.tar.gz ruby-4acc6e259886bd3adb3ad0e085d948bae9bb598e.tar.xz ruby-4acc6e259886bd3adb3ad0e085d948bae9bb598e.zip | |
fix rdoc position of Regexp.union.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | re.c | 34 |
1 files changed, 17 insertions, 17 deletions
@@ -2042,23 +2042,6 @@ rb_reg_s_try_convert(VALUE dummy, VALUE re) return rb_check_regexp_type(re); } -/* - * call-seq: - * Regexp.union([pattern]*) => new_regexp - * Regexp.union(array_of_patterns) => new_regexp - * - * Return a <code>Regexp</code> object that is the union of the given - * <em>pattern</em>s, i.e., will match any of its parts. The <em>pattern</em>s - * can be Regexp objects, in which case their options will be preserved, or - * Strings. If no patterns are given, returns <code>/(?!)/</code>. - * - * Regexp.union #=> /(?!)/ - * Regexp.union("penzance") #=> /penzance/ - * Regexp.union("a+b*c") #=> /a\+b\*c/ - * Regexp.union("skiing", "sledding") #=> /skiing|sledding/ - * Regexp.union(["skiing", "sledding"]) #=> /skiing|sledding/ - * Regexp.union(/dogs/, /cats/i) #=> /(?-mix:dogs)|(?i-mx:cats)/ - */ static VALUE rb_reg_s_union(VALUE self, VALUE args0) { @@ -2123,6 +2106,23 @@ rb_reg_s_union(VALUE self, VALUE args0) } } +/* + * call-seq: + * Regexp.union(pat1, pat2, ...) => new_regexp + * Regexp.union(pats_ary) => new_regexp + * + * Return a <code>Regexp</code> object that is the union of the given + * <em>pattern</em>s, i.e., will match any of its parts. The <em>pattern</em>s + * can be Regexp objects, in which case their options will be preserved, or + * Strings. If no patterns are given, returns <code>/(?!)/</code>. + * + * Regexp.union #=> /(?!)/ + * Regexp.union("penzance") #=> /penzance/ + * Regexp.union("a+b*c") #=> /a\+b\*c/ + * Regexp.union("skiing", "sledding") #=> /skiing|sledding/ + * Regexp.union(["skiing", "sledding"]) #=> /skiing|sledding/ + * Regexp.union(/dogs/, /cats/i) #=> /(?-mix:dogs)|(?i-mx:cats)/ + */ static VALUE rb_reg_s_union_m(VALUE self, VALUE args) { |
