diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-28 15:47:52 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-28 15:47:52 +0000 |
commit | e8b9611b3294dbfbeb9fb5de6b834b605e4e582c (patch) | |
tree | 2bf7d31b6ae070a300baa55a6ae8b26082210847 /numeric.c | |
parent | 847e362192c0197bbdc67b54510ccdf136dd35da (diff) | |
download | ruby-e8b9611b3294dbfbeb9fb5de6b834b605e4e582c.tar.gz |
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
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |