1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* proc.c: Small documentation fixes.

* re.c: ditto

* string.c: ditto

* time.c: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@27872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
marcandre 2010-05-17 21:50:17 +00:00
parent e2ee4678a1
commit c98396334f
4 changed files with 11 additions and 14 deletions

9
proc.c
View file

@ -528,10 +528,10 @@ proc_lambda(void)
/* /*
* call-seq: * call-seq:
* prc === obj -> obj * prc === obj -> result_of_proc
* *
* Invokes the block, with <i>obj</i> as the block's parameter. It is * 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 static VALUE
@ -728,7 +728,10 @@ unnamed_parameters(int arity)
* call-seq: * call-seq:
* proc.parameters -> array * 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 static VALUE

4
re.c
View file

@ -2836,9 +2836,9 @@ rb_reg_match_m(int argc, VALUE *argv, VALUE re)
/* /*
* call-seq: * call-seq:
* Regexp.new(string [, options] [, lang]) -> regexp * Regexp.new(string, [options [, lang]]) -> regexp
* Regexp.new(regexp) -> regexp * Regexp.new(regexp) -> regexp
* Regexp.compile(string [, options] [, lang]) -> regexp * Regexp.compile(string, [options [, lang]]) -> regexp
* Regexp.compile(regexp) -> regexp * Regexp.compile(regexp) -> regexp
* *
* Constructs a new regular expression from <i>pattern</i>, which can be either * Constructs a new regular expression from <i>pattern</i>, which can be either

View file

@ -1399,7 +1399,7 @@ rb_check_string_type(VALUE str)
* Returns converted string or nil if <i>obj</i> cannot be converted * Returns converted string or nil if <i>obj</i> cannot be converted
* for any reason. * for any reason.
* *
* String.try_convert("str") #=> str * String.try_convert("str") #=> "str"
* String.try_convert(/re/) #=> nil * String.try_convert(/re/) #=> nil
*/ */
static VALUE static VALUE

10
time.c
View file

@ -2117,13 +2117,7 @@ time_init_1(int argc, VALUE *argv, VALUE time)
/* /*
* call-seq: * call-seq:
* Time.new -> time * Time.new -> time
* Time.new(year) -> time * Time.new(year, month=nil, day=nil, hour=nil, min=nil, sec=nil, utc_offset=nil) -> 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
* *
* Returns a <code>Time</code> object. * Returns a <code>Time</code> object.
* *
@ -3089,7 +3083,7 @@ time_to_f(VALUE time)
/* /*
* call-seq: * call-seq:
* time.to_r -> Rational * time.to_r -> a_rational
* *
* Returns the value of <i>time</i> as a rational number of seconds * Returns the value of <i>time</i> as a rational number of seconds
* since the Epoch. * since the Epoch.