summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authorStefan Stùˆben <MSNexploder@gmail.com>2020-09-25 19:56:30 +0200
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-10-21 12:45:18 +0900
commit8c2e5bbf58e562ea410b53c2f77e4186d5ca9da3 (patch)
tree974a704790a7500e83e5064e63d3cff191395386 /numeric.c
parentd497436d07bc02989d6af284011193d18f7b8368 (diff)
Don't redefine #rb_intern over and over again
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3589
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/numeric.c b/numeric.c
index 4a61d64368..fb9b28bcb3 100644
--- a/numeric.c
+++ b/numeric.c
@@ -5542,16 +5542,13 @@ rb_int_s_isqrt(VALUE self, VALUE num)
void
Init_Numeric(void)
{
-#undef rb_intern
-#define rb_intern(str) rb_intern_const(str)
-
#ifdef _UNICOSMP
/* Turn off floating point exceptions for divide by zero, etc. */
_set_Creg(0, 0);
#endif
- id_coerce = rb_intern("coerce");
- id_to = rb_intern("to");
- id_by = rb_intern("by");
+ id_coerce = rb_intern_const("coerce");
+ id_to = rb_intern_const("to");
+ id_by = rb_intern_const("by");
rb_eZeroDivError = rb_define_class("ZeroDivisionError", rb_eStandardError);
rb_eFloatDomainError = rb_define_class("FloatDomainError", rb_eRangeError);