summaryrefslogtreecommitdiff
path: root/rational.c
diff options
context:
space:
mode:
Diffstat (limited to 'rational.c')
-rw-r--r--rational.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/rational.c b/rational.c
index c606f3c..8b4a394 100644
--- a/rational.c
+++ b/rational.c
@@ -5,23 +5,32 @@
which is written in ruby.
*/
-#include "internal.h"
-#include "id.h"
-#include <math.h>
+#include "ruby/config.h"
+
+#include <ctype.h>
#include <float.h>
+#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
-#define NDEBUG
-#include "ruby_assert.h"
-
#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
#define USE_GMP
#include <gmp.h>
#endif
+#define NDEBUG
+#include "id.h"
+#include "internal.h"
+#include "internal/complex.h"
+#include "internal/error.h"
+#include "internal/gc.h"
+#include "internal/numeric.h"
+#include "internal/object.h"
+#include "internal/rational.h"
+#include "ruby_assert.h"
+
#define ZERO INT2FIX(0)
#define ONE INT2FIX(1)
#define TWO INT2FIX(2)
@@ -2299,8 +2308,6 @@ float_rationalize(int argc, VALUE *argv, VALUE self)
}
}
-#include <ctype.h>
-
inline static int
issign(int c)
{