Actions
Feature #15918
openPattern matching for Set
Feature #15918:
Pattern matching for Set
Description
Currently, Set does not respond to deconstruct. Shouldn't we implement it using to_a?
require 'set'
case Set[1, 2, 3]
in [1, 2, 3]
p "match"
else
p "no match"
end
# => "no match", should be "match"
Actions