From dcee404ebb8d37c0a85707ad61d55516e2aba022 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Fri, 10 May 2024 20:36:01 +0900 Subject: [PATCH] mruby-hash-ext: use NONE.equal?() for NONE comparison; ref #6262 --- mrbgems/mruby-hash-ext/mrblib/hash.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mrbgems/mruby-hash-ext/mrblib/hash.rb b/mrbgems/mruby-hash-ext/mrblib/hash.rb index 11537093fc..1b73119303 100644 --- a/mrbgems/mruby-hash-ext/mrblib/hash.rb +++ b/mrbgems/mruby-hash-ext/mrblib/hash.rb @@ -164,7 +164,7 @@ def fetch(key, none=NONE, &block) unless self.key?(key) if block block.call(key) - elsif none != NONE + elsif !NONE.equal?(none) none else raise KeyError, "Key not found: #{key.inspect}"