ruby-changes:15931
From: marcandre <ko1@a...>
Date: Tue, 18 May 2010 06:50:26 +0900 (JST)
Subject: [ruby-changes:15931] Ruby:r27872 (ruby_1_9_2): * proc.c: Small documentation fixes.
marcandre 2010-05-18 06:50:17 +0900 (Tue, 18 May 2010) New Revision: 27872 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27872 Log: * proc.c: Small documentation fixes. * re.c: ditto * string.c: ditto * time.c: ditto Modified files: branches/ruby_1_9_2/proc.c branches/ruby_1_9_2/re.c branches/ruby_1_9_2/string.c branches/ruby_1_9_2/time.c Index: ruby_1_9_2/time.c =================================================================== --- ruby_1_9_2/time.c (revision 27871) +++ ruby_1_9_2/time.c (revision 27872) @@ -2117,13 +2117,7 @@ /* * call-seq: * Time.new -> time - * Time.new(year) -> time - * Time.new(year, month) -> time - * Time.new(year, month, day) -> time - * Time.new(year, month, day, hour) -> time - * Time.new(year, month, day, hour, min) -> time - * Time.new(year, month, day, hour, min, sec) -> time - * Time.new(year, month, day, hour, min, sec, utc_offset) -> time + * Time.new(year, month=nil, day=nil, hour=nil, min=nil, sec=nil, utc_offset=nil) -> time * * Returns a <code>Time</code> object. * @@ -3089,7 +3083,7 @@ /* * call-seq: - * time.to_r -> Rational + * time.to_r -> a_rational * * Returns the value of <i>time</i> as a rational number of seconds * since the Epoch. Index: ruby_1_9_2/re.c =================================================================== --- ruby_1_9_2/re.c (revision 27871) +++ ruby_1_9_2/re.c (revision 27872) @@ -2836,9 +2836,9 @@ /* * call-seq: - * Regexp.new(string [, options] [, lang]) -> regexp + * 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 * * Constructs a new regular expression from <i>pattern</i>, which can be either Index: ruby_1_9_2/string.c =================================================================== --- ruby_1_9_2/string.c (revision 27871) +++ ruby_1_9_2/string.c (revision 27872) @@ -1399,7 +1399,7 @@ * Returns converted string or nil if <i>obj</i> cannot be converted * for any reason. * - * String.try_convert("str") #=> str + * String.try_convert("str") #=> "str" * String.try_convert(/re/) #=> nil */ static VALUE Index: ruby_1_9_2/proc.c =================================================================== --- ruby_1_9_2/proc.c (revision 27871) +++ ruby_1_9_2/proc.c (revision 27872) @@ -528,10 +528,10 @@ /* * call-seq: - * prc === obj -> obj + * prc === obj -> result_of_proc * * Invokes the block, with <i>obj</i> as the block's parameter. It is - * to allow a proc object to be a target of when clause in the case statement. + * to allow a proc object to be a target of +when+ clause in the case statement. */ static VALUE @@ -728,7 +728,10 @@ * call-seq: * proc.parameters -> array * - * returns the parameter information of this proc + * returns the parameter information of this proc. + * + * prc = lambda{|x, y=42, *rest|} + * prc.parameters #=> [[:req, :x], [:opt, :y], [:rest, :rest]] */ static VALUE -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/