Skip to content

Commit

Permalink
stripped trailing spaces.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Feb 22, 2009
1 parent 624d07b commit 12d2c8b
Show file tree
Hide file tree
Showing 43 changed files with 847 additions and 849 deletions.
380 changes: 190 additions & 190 deletions array.c

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions bignum.c
Expand Up @@ -1714,7 +1714,7 @@ bigmul1_karatsuba(VALUE x, VALUE y)
t1 = xl; xl = xh; xh = t1; t1 = xl; xl = xh; xh = t1;
} }
bigadd_core(BDIGITS(xh), RBIGNUM_LEN(xh), bigadd_core(BDIGITS(xh), RBIGNUM_LEN(xh),
BDIGITS(xl), RBIGNUM_LEN(xl), BDIGITS(xl), RBIGNUM_LEN(xl),
BDIGITS(xh), RBIGNUM_LEN(xh)); BDIGITS(xh), RBIGNUM_LEN(xh));


/* yh <- yh + yl */ /* yh <- yh + yl */
Expand All @@ -1723,7 +1723,7 @@ bigmul1_karatsuba(VALUE x, VALUE y)
t1 = yl; yl = yh; yh = t1; t1 = yl; yl = yh; yh = t1;
} }
bigadd_core(BDIGITS(yh), RBIGNUM_LEN(yh), bigadd_core(BDIGITS(yh), RBIGNUM_LEN(yh),
BDIGITS(yl), RBIGNUM_LEN(yl), BDIGITS(yl), RBIGNUM_LEN(yl),
BDIGITS(yh), RBIGNUM_LEN(yh)); BDIGITS(yh), RBIGNUM_LEN(yh));
} }
else yh = xh; else yh = xh;
Expand Down
2 changes: 1 addition & 1 deletion blockinlining.c
Expand Up @@ -34,7 +34,7 @@ iseq_special_block(rb_iseq_t *iseq, void *builder)
else { else {
iseq->cached_special_block_builder = (void *)1; iseq->cached_special_block_builder = (void *)1;
} }

if (iseq->parent_iseq) { if (iseq->parent_iseq) {
parent = iseq->parent_iseq->self; parent = iseq->parent_iseq->self;
} }
Expand Down
62 changes: 31 additions & 31 deletions class.c
Expand Up @@ -82,7 +82,7 @@ clone_method(ID mid, NODE *body, struct clone_method_data *data)
NODE *fbody = body->nd_body->nd_body; NODE *fbody = body->nd_body->nd_body;


if (nd_type(fbody) == RUBY_VM_METHOD_NODE) { if (nd_type(fbody) == RUBY_VM_METHOD_NODE) {
fbody = NEW_NODE(RUBY_VM_METHOD_NODE, 0, fbody = NEW_NODE(RUBY_VM_METHOD_NODE, 0,
rb_iseq_clone((VALUE)fbody->nd_body, data->klass), rb_iseq_clone((VALUE)fbody->nd_body, data->klass),
0); 0);
} }
Expand Down Expand Up @@ -198,7 +198,7 @@ make_metametaclass(VALUE metaclass)
} }
else { else {
metametaclass = rb_class_boot(Qnil); metametaclass = rb_class_boot(Qnil);
RBASIC(metametaclass)->klass = RBASIC(metametaclass)->klass =
(RBASIC(RBASIC(metaclass)->klass)->klass == RBASIC(metaclass)->klass) (RBASIC(RBASIC(metaclass)->klass)->klass == RBASIC(metaclass)->klass)
? make_metametaclass(RBASIC(metaclass)->klass) ? make_metametaclass(RBASIC(metaclass)->klass)
: RBASIC(RBASIC(metaclass)->klass)->klass; : RBASIC(RBASIC(metaclass)->klass)->klass;
Expand All @@ -212,9 +212,9 @@ make_metametaclass(VALUE metaclass)
while (FL_TEST(super_of_metaclass, T_ICLASS)) { while (FL_TEST(super_of_metaclass, T_ICLASS)) {
super_of_metaclass = RCLASS_SUPER(super_of_metaclass); super_of_metaclass = RCLASS_SUPER(super_of_metaclass);
} }
RCLASS_SUPER(metametaclass) = RCLASS_SUPER(metametaclass) =
rb_iv_get(RBASIC(super_of_metaclass)->klass, "__attached__") == super_of_metaclass rb_iv_get(RBASIC(super_of_metaclass)->klass, "__attached__") == super_of_metaclass
? RBASIC(super_of_metaclass)->klass ? RBASIC(super_of_metaclass)->klass
: make_metametaclass(super_of_metaclass); : make_metametaclass(super_of_metaclass);
OBJ_INFECT(metametaclass, RCLASS_SUPER(metametaclass)); OBJ_INFECT(metametaclass, RCLASS_SUPER(metametaclass));


Expand Down Expand Up @@ -422,7 +422,7 @@ rb_include_module(VALUE klass, VALUE module)
if (!OBJ_UNTRUSTED(klass)) { if (!OBJ_UNTRUSTED(klass)) {
rb_secure(4); rb_secure(4);
} }

if (TYPE(module) != T_MODULE) { if (TYPE(module) != T_MODULE) {
Check_Type(module, T_MODULE); Check_Type(module, T_MODULE);
} }
Expand Down Expand Up @@ -461,16 +461,16 @@ rb_include_module(VALUE klass, VALUE module)
/* /*
* call-seq: * call-seq:
* mod.included_modules -> array * mod.included_modules -> array
* *
* Returns the list of modules included in <i>mod</i>. * Returns the list of modules included in <i>mod</i>.
* *
* module Mixin * module Mixin
* end * end
* *
* module Outer * module Outer
* include Mixin * include Mixin
* end * end
* *
* Mixin.included_modules #=> [] * Mixin.included_modules #=> []
* Outer.included_modules #=> [Mixin] * Outer.included_modules #=> [Mixin]
*/ */
Expand All @@ -492,10 +492,10 @@ rb_mod_included_modules(VALUE mod)
/* /*
* call-seq: * call-seq:
* mod.include?(module) => true or false * mod.include?(module) => true or false
* *
* Returns <code>true</code> if <i>module</i> is included in * Returns <code>true</code> if <i>module</i> is included in
* <i>mod</i> or one of <i>mod</i>'s ancestors. * <i>mod</i> or one of <i>mod</i>'s ancestors.
* *
* module A * module A
* end * end
* class B * class B
Expand Down Expand Up @@ -525,15 +525,15 @@ rb_mod_include_p(VALUE mod, VALUE mod2)
/* /*
* call-seq: * call-seq:
* mod.ancestors -> array * mod.ancestors -> array
* *
* Returns a list of modules included in <i>mod</i> (including * Returns a list of modules included in <i>mod</i> (including
* <i>mod</i> itself). * <i>mod</i> itself).
* *
* module Mod * module Mod
* include Math * include Math
* include Comparable * include Comparable
* end * end
* *
* Mod.ancestors #=> [Mod, Comparable, Math] * Mod.ancestors #=> [Mod, Comparable, Math]
* Math.ancestors #=> [Math] * Math.ancestors #=> [Math]
*/ */
Expand Down Expand Up @@ -612,7 +612,7 @@ method_entry(ID key, NODE *body, st_table *list)
if (key == ID_ALLOCATOR) { if (key == ID_ALLOCATOR) {
return ST_CONTINUE; return ST_CONTINUE;
} }

if (!st_lookup(list, key, 0)) { if (!st_lookup(list, key, 0)) {
if (body ==0 || !body->nd_body->nd_body) { if (body ==0 || !body->nd_body->nd_body) {
type = -1; /* none */ type = -1; /* none */
Expand Down Expand Up @@ -658,14 +658,14 @@ class_instance_method_list(int argc, VALUE *argv, VALUE mod, int (*func) (ID, lo
/* /*
* call-seq: * call-seq:
* mod.instance_methods(include_super=true) => array * mod.instance_methods(include_super=true) => array
* *
* Returns an array containing the names of instance methods that is callable * Returns an array containing the names of instance methods that is callable
* from outside in the receiver. For a module, these are the public methods; * from outside in the receiver. For a module, these are the public methods;
* for a class, they are the instance (not singleton) methods. With no * for a class, they are the instance (not singleton) methods. With no
* argument, or with an argument that is <code>false</code>, the * argument, or with an argument that is <code>false</code>, the
* instance methods in <i>mod</i> are returned, otherwise the methods * instance methods in <i>mod</i> are returned, otherwise the methods
* in <i>mod</i> and <i>mod</i>'s superclasses are returned. * in <i>mod</i> and <i>mod</i>'s superclasses are returned.
* *
* module A * module A
* def method1() end * def method1() end
* end * end
Expand All @@ -675,7 +675,7 @@ class_instance_method_list(int argc, VALUE *argv, VALUE mod, int (*func) (ID, lo
* class C < B * class C < B
* def method3() end * def method3() end
* end * end
* *
* A.instance_methods #=> [:method1] * A.instance_methods #=> [:method1]
* B.instance_methods(false) #=> [:method2] * B.instance_methods(false) #=> [:method2]
* C.instance_methods(false) #=> [:method3] * C.instance_methods(false) #=> [:method3]
Expand All @@ -691,7 +691,7 @@ rb_class_instance_methods(int argc, VALUE *argv, VALUE mod)
/* /*
* call-seq: * call-seq:
* mod.protected_instance_methods(include_super=true) => array * mod.protected_instance_methods(include_super=true) => array
* *
* Returns a list of the protected instance methods defined in * Returns a list of the protected instance methods defined in
* <i>mod</i>. If the optional parameter is not <code>false</code>, the * <i>mod</i>. If the optional parameter is not <code>false</code>, the
* methods of any ancestors are included. * methods of any ancestors are included.
Expand All @@ -706,11 +706,11 @@ rb_class_protected_instance_methods(int argc, VALUE *argv, VALUE mod)
/* /*
* call-seq: * call-seq:
* mod.private_instance_methods(include_super=true) => array * mod.private_instance_methods(include_super=true) => array
* *
* Returns a list of the private instance methods defined in * Returns a list of the private instance methods defined in
* <i>mod</i>. If the optional parameter is not <code>false</code>, the * <i>mod</i>. If the optional parameter is not <code>false</code>, the
* methods of any ancestors are included. * methods of any ancestors are included.
* *
* module Mod * module Mod
* def method1() end * def method1() end
* private :method1 * private :method1
Expand All @@ -729,7 +729,7 @@ rb_class_private_instance_methods(int argc, VALUE *argv, VALUE mod)
/* /*
* call-seq: * call-seq:
* mod.public_instance_methods(include_super=true) => array * mod.public_instance_methods(include_super=true) => array
* *
* Returns a list of the public instance methods defined in <i>mod</i>. * Returns a list of the public instance methods defined in <i>mod</i>.
* If the optional parameter is not <code>false</code>, the methods of * If the optional parameter is not <code>false</code>, the methods of
* any ancestors are included. * any ancestors are included.
Expand All @@ -744,30 +744,30 @@ rb_class_public_instance_methods(int argc, VALUE *argv, VALUE mod)
/* /*
* call-seq: * call-seq:
* obj.singleton_methods(all=true) => array * obj.singleton_methods(all=true) => array
* *
* Returns an array of the names of singleton methods for <i>obj</i>. * Returns an array of the names of singleton methods for <i>obj</i>.
* If the optional <i>all</i> parameter is true, the list will include * If the optional <i>all</i> parameter is true, the list will include
* methods in modules included in <i>obj</i>. * methods in modules included in <i>obj</i>.
* *
* module Other * module Other
* def three() end * def three() end
* end * end
* *
* class Single * class Single
* def Single.four() end * def Single.four() end
* end * end
* *
* a = Single.new * a = Single.new
* *
* def a.one() * def a.one()
* end * end
* *
* class << a * class << a
* include Other * include Other
* def two() * def two()
* end * end
* end * end
* *
* Single.singleton_methods #=> [:four] * Single.singleton_methods #=> [:four]
* a.singleton_methods(false) #=> [:two, :one] * a.singleton_methods(false) #=> [:two, :one]
* a.singleton_methods #=> [:two, :one, :three] * a.singleton_methods #=> [:two, :one, :three]
Expand Down Expand Up @@ -932,7 +932,7 @@ rb_scan_args(int argc, const VALUE *argv, const char *fmt, ...)
postargc = *q - '0'; postargc = *q - '0';
nonpostargc = argc - postargc; nonpostargc = argc - postargc;
} }
else { else {
postargc = 0; postargc = 0;
nonpostargc = argc; nonpostargc = argc;
} }
Expand All @@ -941,7 +941,7 @@ rb_scan_args(int argc, const VALUE *argv, const char *fmt, ...)
if (nonpostargc < 0) if (nonpostargc < 0)
rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)",
argc, postargc); argc, postargc);
goto rest_arg; goto rest_arg;
} }
else if (ISDIGIT(*p)) { else if (ISDIGIT(*p)) {
/* leading mandatory arguments */ /* leading mandatory arguments */
Expand Down
24 changes: 12 additions & 12 deletions compar.c
Expand Up @@ -50,7 +50,7 @@ cmp_failed(void)
/* /*
* call-seq: * call-seq:
* obj == other => true or false * obj == other => true or false
* *
* Compares two objects based on the receiver's <code><=></code> * Compares two objects based on the receiver's <code><=></code>
* method, returning true if it returns 0. Also returns true if * method, returning true if it returns 0. Also returns true if
* _obj_ and _other_ are the same object. * _obj_ and _other_ are the same object.
Expand All @@ -70,7 +70,7 @@ cmp_equal(VALUE x, VALUE y)
/* /*
* call-seq: * call-seq:
* obj > other => true or false * obj > other => true or false
* *
* Compares two objects based on the receiver's <code><=></code> * Compares two objects based on the receiver's <code><=></code>
* method, returning true if it returns 1. * method, returning true if it returns 1.
*/ */
Expand All @@ -87,7 +87,7 @@ cmp_gt(VALUE x, VALUE y)
/* /*
* call-seq: * call-seq:
* obj >= other => true or false * obj >= other => true or false
* *
* Compares two objects based on the receiver's <code><=></code> * Compares two objects based on the receiver's <code><=></code>
* method, returning true if it returns 0 or 1. * method, returning true if it returns 0 or 1.
*/ */
Expand All @@ -104,7 +104,7 @@ cmp_ge(VALUE x, VALUE y)
/* /*
* call-seq: * call-seq:
* obj < other => true or false * obj < other => true or false
* *
* Compares two objects based on the receiver's <code><=></code> * Compares two objects based on the receiver's <code><=></code>
* method, returning true if it returns -1. * method, returning true if it returns -1.
*/ */
Expand All @@ -121,7 +121,7 @@ cmp_lt(VALUE x, VALUE y)
/* /*
* call-seq: * call-seq:
* obj <= other => true or false * obj <= other => true or false
* *
* Compares two objects based on the receiver's <code><=></code> * Compares two objects based on the receiver's <code><=></code>
* method, returning true if it returns -1 or 0. * method, returning true if it returns -1 or 0.
*/ */
Expand All @@ -138,16 +138,16 @@ cmp_le(VALUE x, VALUE y)
/* /*
* call-seq: * call-seq:
* obj.between?(min, max) => true or false * obj.between?(min, max) => true or false
* *
* Returns <code>false</code> if <i>obj</i> <code><=></code> * Returns <code>false</code> if <i>obj</i> <code><=></code>
* <i>min</i> is less than zero or if <i>anObject</i> <code><=></code> * <i>min</i> is less than zero or if <i>anObject</i> <code><=></code>
* <i>max</i> is greater than zero, <code>true</code> otherwise. * <i>max</i> is greater than zero, <code>true</code> otherwise.
* *
* 3.between?(1, 5) #=> true * 3.between?(1, 5) #=> true
* 6.between?(1, 5) #=> false * 6.between?(1, 5) #=> false
* 'cat'.between?('ant', 'dog') #=> true * 'cat'.between?('ant', 'dog') #=> true
* 'gnu'.between?('ant', 'dog') #=> false * 'gnu'.between?('ant', 'dog') #=> false
* *
*/ */


static VALUE static VALUE
Expand All @@ -167,7 +167,7 @@ cmp_between(VALUE x, VALUE min, VALUE max)
* <code><=></code> to implement the conventional comparison operators * <code><=></code> to implement the conventional comparison operators
* (<code><</code>, <code><=</code>, <code>==</code>, <code>>=</code>, * (<code><</code>, <code><=</code>, <code>==</code>, <code>>=</code>,
* and <code>></code>) and the method <code>between?</code>. * and <code>></code>) and the method <code>between?</code>.
* *
* class SizeMatters * class SizeMatters
* include Comparable * include Comparable
* attr :str * attr :str
Expand All @@ -181,18 +181,18 @@ cmp_between(VALUE x, VALUE min, VALUE max)
* @str * @str
* end * end
* end * end
* *
* s1 = SizeMatters.new("Z") * s1 = SizeMatters.new("Z")
* s2 = SizeMatters.new("YY") * s2 = SizeMatters.new("YY")
* s3 = SizeMatters.new("XXX") * s3 = SizeMatters.new("XXX")
* s4 = SizeMatters.new("WWWW") * s4 = SizeMatters.new("WWWW")
* s5 = SizeMatters.new("VVVVV") * s5 = SizeMatters.new("VVVVV")
* *
* s1 < s2 #=> true * s1 < s2 #=> true
* s4.between?(s1, s3) #=> false * s4.between?(s1, s3) #=> false
* s4.between?(s3, s5) #=> true * s4.between?(s3, s5) #=> true
* [ s3, s2, s5, s4, s1 ].sort #=> [Z, YY, XXX, WWWW, VVVVV] * [ s3, s2, s5, s4, s1 ].sort #=> [Z, YY, XXX, WWWW, VVVVV]
* *
*/ */


void void
Expand Down
1 change: 0 additions & 1 deletion compile.c
Expand Up @@ -3962,7 +3962,6 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
VALUE label; VALUE label;
VALUE label_sym; VALUE label_sym;



CONST_ID(goto_id, "__goto__"); CONST_ID(goto_id, "__goto__");
CONST_ID(label_id, "__label__"); CONST_ID(label_id, "__label__");


Expand Down

0 comments on commit 12d2c8b

Please sign in to comment.