mruby-set/set.rb (reset): add reset method defined in Ruby 2.5

This commit is contained in:
Yukihiro "Matz" Matsumoto
2022-12-14 07:38:38 +09:00
parent ddefcea151
commit ba3541bbc4
+7
View File
@@ -319,4 +319,11 @@ class Set
end
alias to_s inspect
def reset
if frozen?
raise FrozenError, "can't modify frozen Set"
else
@hash.rehash
end
end
end