ruby-changes:2167
From: ko1@a...
Date: 9 Oct 2007 01:04:16 +0900
Subject: [ruby-changes:2167] akr - Ruby:r13658 (trunk): fix rdoc position of Regexp.union.
akr 2007-10-09 01:03:53 +0900 (Tue, 09 Oct 2007)
New Revision: 13658
Modified files:
trunk/re.c
Log:
fix rdoc position of Regexp.union.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/re.c?r1=13658&r2=13657
Index: re.c
===================================================================
--- re.c (revision 13657)
+++ re.c (revision 13658)
@@ -2042,23 +2042,6 @@
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 @@
}
}
+/*
+ * 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)
{
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml