summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-13 04:51:46 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-13 04:51:46 +0000
commit3d5be5f86a900aa9347db8643bacdaebd38ae241 (patch)
treebe8da58bec8182f800f59b96fae3b165f209f9a5
parent598a4bfb0c7bc62eac88ad5390d078c24c3c69ad (diff)
date_core.c: use static ID variables
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ext/date/date_core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/date/date_core.c b/ext/date/date_core.c
index bc7282d..5a7eb38 100644
--- a/ext/date/date_core.c
+++ b/ext/date/date_core.c
@@ -97,7 +97,7 @@ f_ge_p(VALUE x, VALUE y)
{
if (FIXNUM_P(x) && FIXNUM_P(y))
return f_boolcast(FIX2LONG(x) >= FIX2LONG(y));
- return rb_funcall(x, rb_intern(">="), 1, y);
+ return rb_funcall(x, id_ge_p, 1, y);
}
inline static VALUE
@@ -105,7 +105,7 @@ f_eqeq_p(VALUE x, VALUE y)
{
if (FIXNUM_P(x) && FIXNUM_P(y))
return f_boolcast(FIX2LONG(x) == FIX2LONG(y));
- return rb_funcall(x, rb_intern("=="), 1, y);
+ return rb_funcall(x, id_eqeq_p, 1, y);
}
inline static VALUE
@@ -6271,7 +6271,7 @@ cmp_gen(VALUE self, VALUE other)
return INT2FIX(f_cmp(m_ajd(dat), other));
else if (k_date_p(other))
return INT2FIX(f_cmp(m_ajd(dat), f_ajd(other)));
- return rb_num_coerce_cmp(self, other, rb_intern("<=>"));
+ return rb_num_coerce_cmp(self, other, id_cmp);
}
static VALUE
@@ -6400,7 +6400,7 @@ equal_gen(VALUE self, VALUE other)
return f_eqeq_p(m_real_local_jd(dat), other);
else if (k_date_p(other))
return f_eqeq_p(m_real_local_jd(dat), f_jd(other));
- return rb_num_coerce_cmp(self, other, rb_intern("=="));
+ return rb_num_coerce_cmp(self, other, id_eqeq_p);
}
/*