Open hachi8833 opened 4 years ago
This is just for my interest regarding https://github.com/goby-lang/goby/issues/342 .
This apparently works but is still not the real Enumerator class. Currently, only Array#to_enum, Hash#to_enum, Enumerator#inspect is available. (:each is a fake😆)
Array#to_enum
Hash#to_enum
Enumerator#inspect
:each
» a = [1, 2, 3].to_enum #» <Enumerator: [1, 2, 3]:each> » a.class #» Enumerator » a.inspect #» <Enumerator: [1, 2, 3]:each> » h = {k1: 1, k2:2}.to_enum #» <Enumerator: { k1: 1, k2: 2 }:each> » h.class #» Enumerator » h.inspect #» <Enumerator: { k1: 1, k2: 2 }:each>
This is just for my interest regarding https://github.com/goby-lang/goby/issues/342 .
This apparently works but is still not the real Enumerator class. Currently, only
Array#to_enum
,Hash#to_enum
,Enumerator#inspect
is available. (:each
is a fake😆)