mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Don't redefine #rb_intern over and over again
This commit is contained in:
parent
d497436d07
commit
8c2e5bbf58
Notes:
git
2020-10-21 12:45:44 +09:00
23 changed files with 178 additions and 239 deletions
11
rational.c
11
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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue