From e8b9611b3294dbfbeb9fb5de6b834b605e4e582c Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 28 Feb 2014 15:47:52 +0000 Subject: [PATCH] numeric.c: predefined constants * numeric.c (id_eq, id_cmp): use predefined constants in id.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- numeric.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/numeric.c b/numeric.c index d8f2c3470c..2a3ebce7c2 100644 --- a/numeric.c +++ b/numeric.c @@ -109,7 +109,9 @@ static VALUE fix_uminus(VALUE num); static VALUE fix_mul(VALUE x, VALUE y); static VALUE int_pow(long x, unsigned long y); -static ID id_coerce, id_to_i, id_eq, id_div, id_cmp; +static ID id_coerce, id_to_i, id_div; +#define id_eq idEq +#define id_cmp idCmp VALUE rb_cNumeric; VALUE rb_cFloat; @@ -3849,9 +3851,7 @@ Init_Numeric(void) #endif id_coerce = rb_intern("coerce"); id_to_i = rb_intern("to_i"); - id_eq = rb_intern("=="); id_div = rb_intern("div"); - id_cmp = rb_intern("<=>"); rb_eZeroDivError = rb_define_class("ZeroDivisionError", rb_eStandardError); rb_eFloatDomainError = rb_define_class("FloatDomainError", rb_eRangeError);