Closed kke closed 5 years ago
Apparently this also happens with OpenStruct
so maybe it should be reported to ruby issue tracker instead.
Edit: Reported as https://bugs.ruby-lang.org/issues/16086
While frustrating (pulling hair because struct.each
does nothing until realizing there's no .each
), this is actually not a bug in either piece.
This can cause confusion.
Unknown key with a block should probably raise
NoMethodError
.