mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
847e362192
commit
e8b9611b32
1 changed files with 3 additions and 3 deletions
|
@ -109,7 +109,9 @@ static VALUE fix_uminus(VALUE num);
|
||||||
static VALUE fix_mul(VALUE x, VALUE y);
|
static VALUE fix_mul(VALUE x, VALUE y);
|
||||||
static VALUE int_pow(long x, unsigned long 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_cNumeric;
|
||||||
VALUE rb_cFloat;
|
VALUE rb_cFloat;
|
||||||
|
@ -3849,9 +3851,7 @@ Init_Numeric(void)
|
||||||
#endif
|
#endif
|
||||||
id_coerce = rb_intern("coerce");
|
id_coerce = rb_intern("coerce");
|
||||||
id_to_i = rb_intern("to_i");
|
id_to_i = rb_intern("to_i");
|
||||||
id_eq = rb_intern("==");
|
|
||||||
id_div = rb_intern("div");
|
id_div = rb_intern("div");
|
||||||
id_cmp = rb_intern("<=>");
|
|
||||||
|
|
||||||
rb_eZeroDivError = rb_define_class("ZeroDivisionError", rb_eStandardError);
|
rb_eZeroDivError = rb_define_class("ZeroDivisionError", rb_eStandardError);
|
||||||
rb_eFloatDomainError = rb_define_class("FloatDomainError", rb_eRangeError);
|
rb_eFloatDomainError = rb_define_class("FloatDomainError", rb_eRangeError);
|
||||||
|
|
Loading…
Add table
Reference in a new issue