summaryrefslogtreecommitdiff
path: root/rational.c
diff options
context:
space:
mode:
authorStefan Stùˆben <MSNexploder@gmail.com>2020-09-25 17:56:30 (GMT)
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-10-21 03:45:18 (GMT)
commit8c2e5bbf58e562ea410b53c2f77e4186d5ca9da3 (patch)
tree974a704790a7500e83e5064e63d3cff191395386 /rational.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 'rational.c')
-rw-r--r--rational.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/rational.c b/rational.c
index aa90342..6ac42bf 100644
--- a/rational.c
+++ b/rational.c
@@ -2723,13 +2723,10 @@ void
Init_Rational(void)
{
VALUE compat;
-#undef rb_intern
-#define rb_intern(str) rb_intern_const(str)
-
- id_abs = rb_intern("abs");
- id_integer_p = rb_intern("integer?");
- id_i_num = rb_intern("@numerator");
- id_i_den = rb_intern("@denominator");
+ id_abs = rb_intern_const("abs");
+ id_integer_p = rb_intern_const("integer?");
+ id_i_num = rb_intern_const("@numerator");
+ id_i_den = rb_intern_const("@denominator");
rb_cRational = rb_define_class("Rational", rb_cNumeric);