From 7729de4d91ffbf0fe8fa4f2a95b85d3406845471 Mon Sep 17 00:00:00 2001 From: marcandre Date: Mon, 17 May 2010 21:07:33 +0000 Subject: * array.c: Documentation: change => in call-seq to ->. Harmonize "#=>" in examples. [ruby-core:30206] * bignum.c: ditto * class.c: ditto * compar.c: ditto * cont.c: ditto * dir.c: ditto * encoding.c: ditto * enum.c: ditto * enumerator.c: ditto * error.c: ditto * eval.c: ditto * file.c: ditto * gc.c: ditto * io.c: ditto * load.c: ditto * marshal.c: ditto * math.c: ditto * numeric.c: ditto * object.c: ditto * pack.c: ditto * proc.c: ditto * process.c: ditto * random.c: ditto * range.c: ditto * re.c: ditto * ruby.c: ditto * signal.c: ditto * sprintf.c: ditto * string.c: ditto * struct.c: ditto * thread.c: ditto * time.c: ditto * transcode.c: ditto * variable.c: ditto * vm_eval.c: ditto * vm_method.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- re.c | 94 ++++++++++++++++++++++++++++++++++---------------------------------- 1 file changed, 47 insertions(+), 47 deletions(-) (limited to 're.c') diff --git a/re.c b/re.c index e4f1968733..fc3026c4f3 100644 --- a/re.c +++ b/re.c @@ -402,7 +402,7 @@ rb_reg_desc(const char *s, long len, VALUE re) /* * call-seq: - * rxp.source => str + * rxp.source -> str * * Returns the original string of the pattern. * @@ -427,7 +427,7 @@ rb_reg_source(VALUE re) /* * call-seq: - * rxp.inspect => string + * rxp.inspect -> string * * Produce a nicely formatted string-version of _rxp_. Perhaps surprisingly, * #inspect actually produces the more natural version of @@ -449,7 +449,7 @@ rb_reg_inspect(VALUE re) /* * call-seq: - * rxp.to_s => str + * rxp.to_s -> str * * Returns a string containing the regular expression and its options (using the * (?opts:source) notation. This string can be fed back in to @@ -596,7 +596,7 @@ rb_reg_raise_str(VALUE str, int options, const char *err) /* * call-seq: - * rxp.casefold? => true or false + * rxp.casefold? -> true or false * * Returns the value of the case-insensitive flag. * @@ -616,7 +616,7 @@ rb_reg_casefold_p(VALUE re) /* * call-seq: - * rxp.options => fixnum + * rxp.options -> fixnum * * Returns the set of bits corresponding to the options used when creating this * Regexp (see Regexp::new for details. Note that additional bits @@ -655,7 +655,7 @@ reg_names_iter(const OnigUChar *name, const OnigUChar *name_end, /* * call-seq: - * rxp.names => [name1, name2, ...] + * rxp.names -> [name1, name2, ...] * * Returns a list of names of captures as an array of strings. * @@ -696,7 +696,7 @@ reg_named_captures_iter(const OnigUChar *name, const OnigUChar *name_end, /* * call-seq: - * rxp.named_captures => hash + * rxp.named_captures -> hash * * Returns a hash representing information about named captures of rxp. * @@ -933,7 +933,7 @@ match_init_copy(VALUE obj, VALUE orig) /* * call-seq: - * mtch.regexp => regexp + * mtch.regexp -> regexp * * Returns the regexp. * @@ -950,7 +950,7 @@ match_regexp(VALUE match) /* * call-seq: - * mtch.names => [name1, name2, ...] + * mtch.names -> [name1, name2, ...] * * Returns a list of names of captures as an array of strings. * It is same as mtch.regexp.names. @@ -971,8 +971,8 @@ match_names(VALUE match) /* * call-seq: - * mtch.length => integer - * mtch.size => integer + * mtch.length -> integer + * mtch.size -> integer * * Returns the number of elements in the match array. * @@ -1031,7 +1031,7 @@ rb_reg_backref_number(VALUE match, VALUE backref) /* * call-seq: - * mtch.offset(n) => array + * mtch.offset(n) -> array * * Returns a two-element array containing the beginning and ending offsets of * the nth match. @@ -1068,7 +1068,7 @@ match_offset(VALUE match, VALUE n) /* * call-seq: - * mtch.begin(n) => integer + * mtch.begin(n) -> integer * * Returns the offset of the start of the nth element of the match * array in the string. @@ -1103,7 +1103,7 @@ match_begin(VALUE match, VALUE n) /* * call-seq: - * mtch.end(n) => integer + * mtch.end(n) -> integer * * Returns the offset of the character immediately following the end of the * nth element of the match array in the string. @@ -1145,7 +1145,7 @@ rb_match_busy(VALUE match) /* * call-seq: - * rxp.fixed_encoding? => true or false + * rxp.fixed_encoding? -> true or false * * Returns false if rxp is applicable to * a string with any ASCII compatible encoding. @@ -1440,7 +1440,7 @@ rb_reg_last_match(VALUE match) /* * call-seq: - * mtch.pre_match => str + * mtch.pre_match -> str * * Returns the portion of the original string before the current match. * Equivalent to the special variable $`. @@ -1467,7 +1467,7 @@ rb_reg_match_pre(VALUE match) /* * call-seq: - * mtch.post_match => str + * mtch.post_match -> str * * Returns the portion of the original string after the current match. * Equivalent to the special variable $'. @@ -1569,7 +1569,7 @@ match_array(VALUE match, int start) /* * call-seq: - * mtch.to_a => anArray + * mtch.to_a -> anArray * * Returns the array of matches. * @@ -1598,7 +1598,7 @@ match_to_a(VALUE match) /* * call-seq: - * mtch.captures => array + * mtch.captures -> array * * Returns the array of captures; equivalent to mtch.to_a[1..-1]. * @@ -1633,10 +1633,10 @@ name_to_backref_number(struct re_registers *regs, VALUE regexp, const char* name /* * call-seq: - * mtch[i] => str or nil - * mtch[start, length] => array - * mtch[range] => array - * mtch[name] => str or nil + * mtch[i] -> str or nil + * mtch[start, length] -> array + * mtch[range] -> array + * mtch[name] -> str or nil * * Match Reference---MatchData acts as an array, and may be * accessed using the normal array indexing techniques. mtch[0] is @@ -1709,7 +1709,7 @@ match_entry(VALUE match, long n) /* * call-seq: * - * mtch.values_at([index]*) => array + * mtch.values_at([index]*) -> array * * Uses each index to access the matching values, returning an array of * the corresponding matches. @@ -1732,7 +1732,7 @@ match_values_at(int argc, VALUE *argv, VALUE match) /* * call-seq: - * mtch.to_s => str + * mtch.to_s -> str * * Returns the entire matched string. * @@ -1755,7 +1755,7 @@ match_to_s(VALUE match) /* * call-seq: - * mtch.string => str + * mtch.string -> str * * Returns a frozen copy of the string passed in to match. * @@ -1791,7 +1791,7 @@ match_inspect_name_iter(const OnigUChar *name, const OnigUChar *name_end, /* * call-seq: - * mtch.inspect => str + * mtch.inspect -> str * * Returns a printable version of mtch. * @@ -2508,7 +2508,7 @@ rb_reg_regcomp(VALUE str) static st_index_t reg_hash(VALUE re); /* * call-seq: - * rxp.hash => fixnum + * rxp.hash -> fixnum * * Produce a hash based on the text and options of this regular expression. */ @@ -2534,8 +2534,8 @@ reg_hash(VALUE re) /* * call-seq: - * rxp == other_rxp => true or false - * rxp.eql?(other_rxp) => true or false + * rxp == other_rxp -> true or false + * rxp.eql?(other_rxp) -> true or false * * Equality---Two regexps are equal if their patterns are identical, they have * the same character set code, and their casefold? values are the @@ -2565,7 +2565,7 @@ rb_reg_equal(VALUE re1, VALUE re2) /* * call-seq: - * mtch.hash => integer + * mtch.hash -> integer * * Produce a hash based on the target string, regexp and matched * positions of this matchdata. @@ -2588,7 +2588,7 @@ match_hash(VALUE match) /* * call-seq: - * mtch == mtch2 => true or false + * mtch == mtch2 -> true or false * * Equality---Two matchdata are equal if their target strings, * patterns, and matched positions are identical. @@ -2651,7 +2651,7 @@ reg_match_pos(VALUE re, VALUE *strp, long pos) /* * call-seq: - * rxp =~ str => integer or nil + * rxp =~ str -> integer or nil * * Match---Matches rxp against str. * @@ -2708,7 +2708,7 @@ rb_reg_match(VALUE re, VALUE str) /* * call-seq: - * rxp === str => true or false + * rxp === str -> true or false * * Case Equality---Synonym for Regexp#=~ used in case statements. * @@ -2744,7 +2744,7 @@ rb_reg_eqq(VALUE re, VALUE str) /* * call-seq: - * ~ rxp => integer or nil + * ~ rxp -> integer or nil * * Match---Matches rxp against the contents of $_. * Equivalent to rxp =~ $_. @@ -2775,8 +2775,8 @@ rb_reg_match2(VALUE re) /* * call-seq: - * rxp.match(str) => matchdata or nil - * rxp.match(str,pos) => matchdata or nil + * rxp.match(str) -> matchdata or nil + * rxp.match(str,pos) -> matchdata or nil * * Returns a MatchData object describing the match, or * nil if there was no match. This is equivalent to retrieving the @@ -2836,10 +2836,10 @@ rb_reg_match_m(int argc, VALUE *argv, VALUE re) /* * call-seq: - * Regexp.new(string [, options] [, lang]) => regexp - * Regexp.new(regexp) => regexp - * Regexp.compile(string [, options] [, lang]) => regexp - * Regexp.compile(regexp) => regexp + * Regexp.new(string [, options] [, lang]) -> regexp + * Regexp.new(regexp) -> regexp + * Regexp.compile(string [, options] [, lang]) -> regexp + * Regexp.compile(regexp) -> regexp * * Constructs a new regular expression from pattern, which can be either * a String or a Regexp (in which case that regexp's @@ -3013,8 +3013,8 @@ rb_reg_quote(VALUE str) /* * call-seq: - * Regexp.escape(str) => string - * Regexp.quote(str) => string + * Regexp.escape(str) -> string + * Regexp.quote(str) -> string * * Escapes any characters that would have special meaning in a regular * expression. Returns a new escaped string, or self if no characters are @@ -3188,8 +3188,8 @@ rb_reg_s_union(VALUE self, VALUE args0) /* * call-seq: - * Regexp.union(pat1, pat2, ...) => new_regexp - * Regexp.union(pats_ary) => new_regexp + * Regexp.union(pat1, pat2, ...) -> new_regexp + * Regexp.union(pats_ary) -> new_regexp * * Return a Regexp object that is the union of the given * patterns, i.e., will match any of its parts. The patterns @@ -3404,8 +3404,8 @@ match_setter(VALUE val) /* * call-seq: - * Regexp.last_match => matchdata - * Regexp.last_match(n) => str + * Regexp.last_match -> matchdata + * Regexp.last_match(n) -> str * * The first form returns the MatchData object generated by the * last successful pattern match. Equivalent to reading the global variable -- cgit v1.2.3