summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-05-06 09:43:49 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-05-06 09:47:41 +0900
commitb0498caa7e92e3f53affb822ba73394624808c98 (patch)
treef70bed61e877e591cc5655336b6e50f4bf70c173 /object.c
parente79e5e0b40d28d0a7eaa06dbfd6b7812bbea2d1e (diff)
Removed unnecessary duplicate code
`rb_equal` may be inlined in `case_equal` and actually same code is generated twice.
Diffstat (limited to 'object.c')
-rw-r--r--object.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/object.c b/object.c
index 9830feff10..30c3ba2030 100644
--- a/object.c
+++ b/object.c
@@ -141,12 +141,9 @@ rb_obj_setup(VALUE obj, VALUE klass, VALUE type)
* Same as \c Object#===, case equality.
*++
*/
-static VALUE
-case_equal(VALUE obj1, VALUE obj2) {
+#define case_equal rb_equal
/* The default implementation of #=== is
* to call #== with the rb_equal() optimization. */
- return rb_equal(obj1, obj2);
-}
/*!
* This function is an optimized version of calling #==.