diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-05 04:25:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-05 04:25:10 +0000 |
commit | 99d65b14b4ec3a546a28b6b17b3b4553eaf27b2f (patch) | |
tree | 96eef7127faf2419d14216d506c98bae49fd45a5 /numeric.c | |
parent | f3dfa40734581b03b1c2565ff1d0a6675c92a213 (diff) | |
download | ruby-99d65b14b4ec3a546a28b6b17b3b4553eaf27b2f.tar.gz |
* compile.c, dir.c, eval.c, eval_jump.h, eval_method.h, numeric.c,
pack.c, parse.y, re.c, thread.c, vm.c, vm_dump.c, call_cfunc.ci,
thread_pthread.ci, thread_win32.ci: fixed indentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 48 |
1 files changed, 24 insertions, 24 deletions
@@ -1225,7 +1225,7 @@ flo_ceil(VALUE num) * * Rounds <i>flt</i> to a given precision in decimal digits (default 0 digits). * Precision may be negative. Returns a a floating point number when ndigits - * is more than one. + * is more than one. * * 1.5.round #=> 2 * (-1.5).round #=> -2 @@ -1624,7 +1624,7 @@ rb_num2ll(VALUE val) if (FIXNUM_P(val)) return (LONG_LONG)FIX2LONG(val); switch (TYPE(val)) { - case T_FLOAT: + case T_FLOAT: if (RFLOAT(val)->value <= (double)LLONG_MAX && RFLOAT(val)->value >= (double)LLONG_MIN) { return (LONG_LONG)(RFLOAT(val)->value); @@ -1638,21 +1638,21 @@ rb_num2ll(VALUE val) rb_raise(rb_eRangeError, "float %s out of range of long long", buf); } - case T_BIGNUM: + case T_BIGNUM: return rb_big2ll(val); - case T_STRING: + case T_STRING: rb_raise(rb_eTypeError, "no implicit conversion from string"); return Qnil; /* not reached */ - case T_TRUE: - case T_FALSE: + case T_TRUE: + case T_FALSE: rb_raise(rb_eTypeError, "no implicit conversion from boolean"); return Qnil; /* not reached */ default: - val = rb_to_int(val); - return NUM2LL(val); + val = rb_to_int(val); + return NUM2LL(val); } } @@ -1867,14 +1867,14 @@ static VALUE rb_int_induced_from(VALUE klass, VALUE x) { switch (TYPE(x)) { - case T_FIXNUM: - case T_BIGNUM: - return x; - case T_FLOAT: - return rb_funcall(x, id_to_i, 0); - default: - rb_raise(rb_eTypeError, "failed to convert %s into Integer", - rb_obj_classname(x)); + case T_FIXNUM: + case T_BIGNUM: + return x; + case T_FLOAT: + return rb_funcall(x, id_to_i, 0); + default: + rb_raise(rb_eTypeError, "failed to convert %s into Integer", + rb_obj_classname(x)); } } @@ -1889,14 +1889,14 @@ static VALUE rb_flo_induced_from(VALUE klass, VALUE x) { switch (TYPE(x)) { - case T_FIXNUM: - case T_BIGNUM: - return rb_funcall(x, rb_intern("to_f"), 0); - case T_FLOAT: - return x; - default: - rb_raise(rb_eTypeError, "failed to convert %s into Float", - rb_obj_classname(x)); + case T_FIXNUM: + case T_BIGNUM: + return rb_funcall(x, rb_intern("to_f"), 0); + case T_FLOAT: + return x; + default: + rb_raise(rb_eTypeError, "failed to convert %s into Float", + rb_obj_classname(x)); } } |