From 27da10ae39dd2764bd56427eebb536bd1d203b2b Mon Sep 17 00:00:00 2001 From: gsinclair Date: Sun, 22 Feb 2004 00:55:23 +0000 Subject: * re.c: corrected documentation format (again) git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@5802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ re.c | 32 +++++++++++++++++--------------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8c6de36dd..89d33d3e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Feb 22 09:54:00 2004 Gavin Sinclair + + * re.c: corrected documentation format (again) + Sat Feb 22 09:43:00 2004 Gavin Sinclair * re.c: corrected documentation format (rb_reg_initialize_m) diff --git a/re.c b/re.c index 57639c5c2..fc68f44aa 100644 --- a/re.c +++ b/re.c @@ -1612,25 +1612,27 @@ rb_reg_match_m(re, str) /* * Document-method: compile * - * call-seq: + * Synonym for Regexp.new + */ + +/* + * call-seq: * Regexp.new(string [, options [, lang]]) => regexp * Regexp.new(regexp) => regexp - * Regexp.compile(string [, options [, lang]]) => regexp + * Regexp.compile(string [, options [, lang]]) => regexp * Regexp.compile(regexp) => regexp - * - * Synonym for Regexp.new * - * Constructs a new regular expression from pattern, which can be either - * a String or a Regexp (in which case that regexp's - * options are propagated, and new options may not be specified (a change as of - * Ruby 1.8). If options is a Fixnum, it should be one or - * more of the constants Regexp::EXTENDED, - * Regexp::IGNORECASE, and Regexp::POSIXLINE, - * or-ed together. Otherwise, if options is not - * nil, the regexp will be case insensitive. The lang - * parameter enables multibyte support for the regexp: `n', `N' = none, `e', - * `E' = EUC, `s', `S' = SJIS, `u', `U' = UTF-8. - * + * Constructs a new regular expression from pattern, which can be either + * a String or a Regexp (in which case that regexp's + * options are propagated, and new options may not be specified (a change as of + * Ruby 1.8). If options is a Fixnum, it should be one or + * more of the constants Regexp::EXTENDED, + * Regexp::IGNORECASE, and Regexp::POSIXLINE, + * or-ed together. Otherwise, if options is not + * nil, the regexp will be case insensitive. The lang + * parameter enables multibyte support for the regexp: `n', `N' = none, `e', + * `E' = EUC, `s', `S' = SJIS, `u', `U' = UTF-8. + * * r1 = Regexp.new('^a-z+:\\s+\w+') #=> /^a-z+:\s+\w+/ * r2 = Regexp.new('cat', true) #=> /cat/i * r3 = Regexp.new('dog', Regexp::EXTENDED) #=> /dog/x -- cgit