From 33c8d6af1e2b18abf27d3fcacfdc6aef29387b23 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 20 Jun 2020 14:09:23 +0900 Subject: Move definition of `BasicObject#!=` to `mrblib`. C implementation used `mrb_funcall()` that bypassed many optimization. --- mrblib/00class.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mrblib') diff --git a/mrblib/00class.rb b/mrblib/00class.rb index 1811236f0..cbcca8610 100644 --- a/mrblib/00class.rb +++ b/mrblib/00class.rb @@ -1,3 +1,13 @@ +class BasicObject + def !=(other) + if self == other + false + else + true + end + end +end + class Module # 15.2.2.4.12 def attr_accessor(*names) -- cgit v1.2.3