summaryrefslogtreecommitdiffhomepage
path: root/mrblib
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-06-20 14:09:23 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-06-20 14:09:23 +0900
commit33c8d6af1e2b18abf27d3fcacfdc6aef29387b23 (patch)
tree935f455897ce5496d968300088a1c5b2e37f7032 /mrblib
parent49ae2a69f2c3acbb952406768320401cf1769425 (diff)
downloadmruby-33c8d6af1e2b18abf27d3fcacfdc6aef29387b23.tar.gz
mruby-33c8d6af1e2b18abf27d3fcacfdc6aef29387b23.zip
Move definition of `BasicObject#!=` to `mrblib`.
C implementation used `mrb_funcall()` that bypassed many optimization.
Diffstat (limited to 'mrblib')
-rw-r--r--mrblib/00class.rb10
1 files changed, 10 insertions, 0 deletions
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)