aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-30 06:20:26 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-30 06:20:26 +0000
commite449d06f15a7b65b8f8bb1441dcad7c35f707b1f (patch)
tree1248058f1385e7b724e4e70e02962648cf11273b
parent69adf990e1d05603b43c6da660870ea5b9ecef49 (diff)
downloadruby-e449d06f15a7b65b8f8bb1441dcad7c35f707b1f.tar.gz
ChangeLog, range.c: adjust indent and style
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog2
-rw-r--r--range.c16
2 files changed, 11 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 44a28881bd..15c800e965 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -27,7 +27,7 @@ Wed Jan 30 14:10:52 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
Wed Jan 30 13:53:43 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
* lib/matrix.rb: Take conjugate for inner product
- [rubyspec:5a01ad5719f2] [ruby-dev:46101]
+ [rubyspec:5a01ad5719f2] [ruby-dev:46101]
Wed Jan 30 13:22:05 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
diff --git a/range.c b/range.c
index 87e013d54a..8b613ecdbf 100644
--- a/range.c
+++ b/range.c
@@ -473,24 +473,27 @@ range_step(int argc, VALUE *argv, VALUE range)
#if SIZEOF_DOUBLE == 8 && defined(HAVE_INT64_T)
union int64_double {
- int64_t i;
- double d;
+ int64_t i;
+ double d;
};
static VALUE
-int64_as_double_to_num(int64_t i) {
+int64_as_double_to_num(int64_t i)
+{
union int64_double convert;
if (i < 0) {
convert.i = -i;
return DBL2NUM(-convert.d);
- } else {
+ }
+ else {
convert.i = i;
return DBL2NUM(convert.d);
}
}
static int64_t
-double_as_int64(double d) {
+double_as_int64(double d)
+{
union int64_double convert;
convert.d = fabs(d);
return d < 0 ? -convert.i : convert.i;
@@ -498,7 +501,8 @@ double_as_int64(double d) {
#endif
static int
-is_integer_p(VALUE v) {
+is_integer_p(VALUE v)
+{
VALUE is_int = rb_check_funcall(v, id_integer_p, 0, 0);
return RTEST(is_int) && is_int != Qundef;
}