Skip to content

Commit 7729de4

Browse files
committed
* 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
1 parent e181ae5 commit 7729de4

36 files changed

+1335
-1335
lines changed

array.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,8 @@ rb_check_array_type(VALUE ary)
479479
* for any reason. This method can be used to check if an argument is an
480480
* array.
481481
*
482-
* Array.try_convert([1]) # => [1]
483-
* Array.try_convert("1") # => nil
482+
* Array.try_convert([1]) #=> [1]
483+
* Array.try_convert("1") #=> nil
484484
*
485485
* if tmp = Array.try_convert(arg)
486486
* # the argument is an array
@@ -3559,9 +3559,9 @@ rb_ary_compact(VALUE ary)
35593559
* given, counts the number of elements yielding a true value.
35603560
*
35613561
* ary = [1, 2, 4, 2]
3562-
* ary.count # => 4
3563-
* ary.count(2) # => 2
3564-
* ary.count{|x|x%2==0} # => 3
3562+
* ary.count #=> 4
3563+
* ary.count(2) #=> 2
3564+
* ary.count{|x|x%2==0} #=> 3
35653565
*
35663566
*/
35673567

@@ -4282,12 +4282,12 @@ rb_ary_repeated_combination(VALUE ary, VALUE num)
42824282
* and return +self+ instead.
42834283
*
42844284
*
4285-
* [1,2,3].product([4,5]) # => [[1,4],[1,5],[2,4],[2,5],[3,4],[3,5]]
4286-
* [1,2].product([1,2]) # => [[1,1],[1,2],[2,1],[2,2]]
4287-
* [1,2].product([3,4],[5,6]) # => [[1,3,5],[1,3,6],[1,4,5],[1,4,6],
4285+
* [1,2,3].product([4,5]) #=> [[1,4],[1,5],[2,4],[2,5],[3,4],[3,5]]
4286+
* [1,2].product([1,2]) #=> [[1,1],[1,2],[2,1],[2,2]]
4287+
* [1,2].product([3,4],[5,6]) #=> [[1,3,5],[1,3,6],[1,4,5],[1,4,6],
42884288
* # [2,3,5],[2,3,6],[2,4,5],[2,4,6]]
4289-
* [1,2].product() # => [[1],[2]]
4290-
* [1,2].product([]) # => []
4289+
* [1,2].product() #=> [[1],[2]]
4290+
* [1,2].product([]) #=> []
42914291
*/
42924292

42934293
static VALUE
@@ -4381,7 +4381,7 @@ rb_ary_product(int argc, VALUE *argv, VALUE ary)
43814381
* Returns first n elements from <i>ary</i>.
43824382
*
43834383
* a = [1, 2, 3, 4, 5, 0]
4384-
* a.take(3) # => [1, 2, 3]
4384+
* a.take(3) #=> [1, 2, 3]
43854385
*
43864386
*/
43874387

@@ -4406,7 +4406,7 @@ rb_ary_take(VALUE obj, VALUE n)
44064406
* If no block is given, an enumerator is returned instead.
44074407
*
44084408
* a = [1, 2, 3, 4, 5, 0]
4409-
* a.take_while {|i| i < 3 } # => [1, 2]
4409+
* a.take_while {|i| i < 3 } #=> [1, 2]
44104410
*
44114411
*/
44124412

@@ -4430,7 +4430,7 @@ rb_ary_take_while(VALUE ary)
44304430
* in an array.
44314431
*
44324432
* a = [1, 2, 3, 4, 5, 0]
4433-
* a.drop(3) # => [4, 5, 0]
4433+
* a.drop(3) #=> [4, 5, 0]
44344434
*
44354435
*/
44364436

@@ -4460,7 +4460,7 @@ rb_ary_drop(VALUE ary, VALUE n)
44604460
* If no block is given, an enumerator is returned instead.
44614461
*
44624462
* a = [1, 2, 3, 4, 5, 0]
4463-
* a.drop_while {|i| i < 3 } # => [3, 4, 5, 0]
4463+
* a.drop_while {|i| i < 3 } #=> [3, 4, 5, 0]
44644464
*
44654465
*/
44664466

bignum.c

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@ rb_big2str(VALUE x, int base)
11121112

11131113
/*
11141114
* call-seq:
1115-
* big.to_s(base=10) => string
1115+
* big.to_s(base=10) -> string
11161116
*
11171117
* Returns a string containing the representation of <i>big</i> radix
11181118
* <i>base</i> (2 through 36).
@@ -1382,7 +1382,7 @@ rb_big_to_f(VALUE x)
13821382

13831383
/*
13841384
* call-seq:
1385-
* big <=> numeric => -1, 0, +1 or nil
1385+
* big <=> numeric -> -1, 0, +1 or nil
13861386
*
13871387
* Comparison---Returns -1, 0, or +1 depending on whether <i>big</i> is
13881388
* less than, equal to, or greater than <i>numeric</i>. This is the
@@ -1543,7 +1543,7 @@ big_le(VALUE x, VALUE y)
15431543

15441544
/*
15451545
* call-seq:
1546-
* big == obj => true or false
1546+
* big == obj -> true or false
15471547
*
15481548
* Returns <code>true</code> only if <i>obj</i> has the same value
15491549
* as <i>big</i>. Contrast this with <code>Bignum#eql?</code>, which
@@ -1581,7 +1581,7 @@ rb_big_eq(VALUE x, VALUE y)
15811581

15821582
/*
15831583
* call-seq:
1584-
* big.eql?(obj) => true or false
1584+
* big.eql?(obj) -> true or false
15851585
*
15861586
* Returns <code>true</code> only if <i>obj</i> is a
15871587
* <code>Bignum</code> with the same value as <i>big</i>. Contrast this
@@ -1602,7 +1602,7 @@ rb_big_eql(VALUE x, VALUE y)
16021602

16031603
/*
16041604
* call-seq:
1605-
* -big => integer
1605+
* -big -> integer
16061606
*
16071607
* Unary minus (returns an integer whose value is 0-big)
16081608
*/
@@ -1619,7 +1619,7 @@ rb_big_uminus(VALUE x)
16191619

16201620
/*
16211621
* call-seq:
1622-
* ~big => integer
1622+
* ~big -> integer
16231623
*
16241624
* Inverts the bits in big. As Bignums are conceptually infinite
16251625
* length, the result acts as if it had an infinite number of one
@@ -1876,7 +1876,7 @@ bigadd(VALUE x, VALUE y, int sign)
18761876

18771877
/*
18781878
* call-seq:
1879-
* big + other => Numeric
1879+
* big + other -> Numeric
18801880
*
18811881
* Adds big and other, returning the result.
18821882
*/
@@ -1913,7 +1913,7 @@ rb_big_plus(VALUE x, VALUE y)
19131913

19141914
/*
19151915
* call-seq:
1916-
* big - other => Numeric
1916+
* big - other -> Numeric
19171917
*
19181918
* Subtracts other from big, returning the result.
19191919
*/
@@ -2273,7 +2273,7 @@ bigmul0(VALUE x, VALUE y)
22732273

22742274
/*
22752275
* call-seq:
2276-
* big * other => Numeric
2276+
* big * other -> Numeric
22772277
*
22782278
* Multiplies big and other, returning the result.
22792279
*/
@@ -2522,7 +2522,7 @@ rb_big_divide(VALUE x, VALUE y, ID op)
25222522

25232523
/*
25242524
* call-seq:
2525-
* big / other => Numeric
2525+
* big / other -> Numeric
25262526
*
25272527
* Performs division: the class of the resulting object depends on
25282528
* the class of <code>numeric</code> and on the magnitude of the
@@ -2537,7 +2537,7 @@ rb_big_div(VALUE x, VALUE y)
25372537

25382538
/*
25392539
* call-seq:
2540-
* big.div(other) => integer
2540+
* big.div(other) -> integer
25412541
*
25422542
* Performs integer division: returns integer value.
25432543
*/
@@ -2550,8 +2550,8 @@ rb_big_idiv(VALUE x, VALUE y)
25502550

25512551
/*
25522552
* call-seq:
2553-
* big % other => Numeric
2554-
* big.modulo(other) => Numeric
2553+
* big % other -> Numeric
2554+
* big.modulo(other) -> Numeric
25552555
*
25562556
* Returns big modulo other. See Numeric.divmod for more
25572557
* information.
@@ -2580,7 +2580,7 @@ rb_big_modulo(VALUE x, VALUE y)
25802580

25812581
/*
25822582
* call-seq:
2583-
* big.remainder(numeric) => number
2583+
* big.remainder(numeric) -> number
25842584
*
25852585
* Returns the remainder after dividing <i>big</i> by <i>numeric</i>.
25862586
*
@@ -2610,7 +2610,7 @@ rb_big_remainder(VALUE x, VALUE y)
26102610

26112611
/*
26122612
* call-seq:
2613-
* big.divmod(numeric) => array
2613+
* big.divmod(numeric) -> array
26142614
*
26152615
* See <code>Numeric#divmod</code>.
26162616
*
@@ -2770,7 +2770,7 @@ bigsqr(VALUE x)
27702770

27712771
/*
27722772
* call-seq:
2773-
* big ** exponent => numeric
2773+
* big ** exponent -> numeric
27742774
*
27752775
* Raises _big_ to the _exponent_ power (which may be an integer, float,
27762776
* or anything that will coerce to a number). The result may be
@@ -2891,7 +2891,7 @@ bigand_int(VALUE x, long y)
28912891

28922892
/*
28932893
* call-seq:
2894-
* big & numeric => integer
2894+
* big & numeric -> integer
28952895
*
28962896
* Performs bitwise +and+ between _big_ and _numeric_.
28972897
*/
@@ -2982,7 +2982,7 @@ bigor_int(VALUE x, long y)
29822982

29832983
/*
29842984
* call-seq:
2985-
* big | numeric => integer
2985+
* big | numeric -> integer
29862986
*
29872987
* Performs bitwise +or+ between _big_ and _numeric_.
29882988
*/
@@ -3073,7 +3073,7 @@ bigxor_int(VALUE x, long y)
30733073
}
30743074
/*
30753075
* call-seq:
3076-
* big ^ numeric => integer
3076+
* big ^ numeric -> integer
30773077
*
30783078
* Performs bitwise +exclusive or+ between _big_ and _numeric_.
30793079
*/
@@ -3143,7 +3143,7 @@ check_shiftdown(VALUE y, VALUE x)
31433143

31443144
/*
31453145
* call-seq:
3146-
* big << numeric => integer
3146+
* big << numeric -> integer
31473147
*
31483148
* Shifts big left _numeric_ positions (right if _numeric_ is negative).
31493149
*/
@@ -3207,7 +3207,7 @@ big_lshift(VALUE x, unsigned long shift)
32073207

32083208
/*
32093209
* call-seq:
3210-
* big >> numeric => integer
3210+
* big >> numeric -> integer
32113211
*
32123212
* Shifts big right _numeric_ positions (left if _numeric_ is negative).
32133213
*/
@@ -3351,7 +3351,7 @@ rb_big_aref(VALUE x, VALUE y)
33513351

33523352
/*
33533353
* call-seq:
3354-
* big.hash => fixnum
3354+
* big.hash -> fixnum
33553355
*
33563356
* Compute a hash based on the value of _big_.
33573357
*/

class.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ rb_mod_included_modules(VALUE mod)
698698

699699
/*
700700
* call-seq:
701-
* mod.include?(module) => true or false
701+
* mod.include?(module) -> true or false
702702
*
703703
* Returns <code>true</code> if <i>module</i> is included in
704704
* <i>mod</i> or one of <i>mod</i>'s ancestors.
@@ -863,7 +863,7 @@ class_instance_method_list(int argc, VALUE *argv, VALUE mod, int (*func) (ID, lo
863863

864864
/*
865865
* call-seq:
866-
* mod.instance_methods(include_super=true) => array
866+
* mod.instance_methods(include_super=true) -> array
867867
*
868868
* Returns an array containing the names of instance methods that is callable
869869
* from outside in the receiver. For a module, these are the public methods;
@@ -896,7 +896,7 @@ rb_class_instance_methods(int argc, VALUE *argv, VALUE mod)
896896

897897
/*
898898
* call-seq:
899-
* mod.protected_instance_methods(include_super=true) => array
899+
* mod.protected_instance_methods(include_super=true) -> array
900900
*
901901
* Returns a list of the protected instance methods defined in
902902
* <i>mod</i>. If the optional parameter is not <code>false</code>, the
@@ -911,7 +911,7 @@ rb_class_protected_instance_methods(int argc, VALUE *argv, VALUE mod)
911911

912912
/*
913913
* call-seq:
914-
* mod.private_instance_methods(include_super=true) => array
914+
* mod.private_instance_methods(include_super=true) -> array
915915
*
916916
* Returns a list of the private instance methods defined in
917917
* <i>mod</i>. If the optional parameter is not <code>false</code>, the
@@ -934,7 +934,7 @@ rb_class_private_instance_methods(int argc, VALUE *argv, VALUE mod)
934934

935935
/*
936936
* call-seq:
937-
* mod.public_instance_methods(include_super=true) => array
937+
* mod.public_instance_methods(include_super=true) -> array
938938
*
939939
* Returns a list of the public instance methods defined in <i>mod</i>.
940940
* If the optional parameter is not <code>false</code>, the methods of
@@ -949,7 +949,7 @@ rb_class_public_instance_methods(int argc, VALUE *argv, VALUE mod)
949949

950950
/*
951951
* call-seq:
952-
* obj.singleton_methods(all=true) => array
952+
* obj.singleton_methods(all=true) -> array
953953
*
954954
* Returns an array of the names of singleton methods for <i>obj</i>.
955955
* If the optional <i>all</i> parameter is true, the list will include

compar.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ cmp_failed(void)
4949

5050
/*
5151
* call-seq:
52-
* obj == other => true or false
52+
* obj == other -> true or false
5353
*
5454
* Compares two objects based on the receiver's <code><=></code>
5555
* method, returning true if it returns 0. Also returns true if
@@ -69,7 +69,7 @@ cmp_equal(VALUE x, VALUE y)
6969

7070
/*
7171
* call-seq:
72-
* obj > other => true or false
72+
* obj > other -> true or false
7373
*
7474
* Compares two objects based on the receiver's <code><=></code>
7575
* method, returning true if it returns 1.
@@ -86,7 +86,7 @@ cmp_gt(VALUE x, VALUE y)
8686

8787
/*
8888
* call-seq:
89-
* obj >= other => true or false
89+
* obj >= other -> true or false
9090
*
9191
* Compares two objects based on the receiver's <code><=></code>
9292
* method, returning true if it returns 0 or 1.
@@ -103,7 +103,7 @@ cmp_ge(VALUE x, VALUE y)
103103

104104
/*
105105
* call-seq:
106-
* obj < other => true or false
106+
* obj < other -> true or false
107107
*
108108
* Compares two objects based on the receiver's <code><=></code>
109109
* method, returning true if it returns -1.
@@ -120,7 +120,7 @@ cmp_lt(VALUE x, VALUE y)
120120

121121
/*
122122
* call-seq:
123-
* obj <= other => true or false
123+
* obj <= other -> true or false
124124
*
125125
* Compares two objects based on the receiver's <code><=></code>
126126
* method, returning true if it returns -1 or 0.
@@ -137,7 +137,7 @@ cmp_le(VALUE x, VALUE y)
137137

138138
/*
139139
* call-seq:
140-
* obj.between?(min, max) => true or false
140+
* obj.between?(min, max) -> true or false
141141
*
142142
* Returns <code>false</code> if <i>obj</i> <code><=></code>
143143
* <i>min</i> is less than zero or if <i>anObject</i> <code><=></code>

cont.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ cont_restore_0(rb_context_t *cont, VALUE *addr_in_prev_frame)
806806

807807
/*
808808
* call-seq:
809-
* callcc {|cont| block } => obj
809+
* callcc {|cont| block } -> obj
810810
*
811811
* Generates a <code>Continuation</code> object, which it passes to the
812812
* associated block. Performing a <em>cont</em><code>.call</code> will

0 commit comments

Comments
 (0)