- The previous fix (commit df7a6b9) mistakenly left in a table.type
/ #t1 == #t2 check that breaks equality for {} and {x=nil}.
- This removes that leftover check, restoring the intended deep
equality semantics.
Signed-off-by: RuksH4n <77233680+rukshanchamindu@users.noreply.github.com>
- The refactor in [Commit 4c460e0](4c460e0bd9) introduced stricter type checks (using table.type and array length comparison), which caused empty tables and tables with nil values to be considered unequal.
- This commit removes the strict shape checks and restores the original deep equality semantics, ensuring {} == {x=nil}.
Signed-off-by: RuksH4n <77233680+rukshanchamindu@users.noreply.github.com>
Some people accidentally, mistakenly, and without any malicious intent forget to attribute code from this resource to its source. This change will hopefully assist people, so that they do not make that mistake again.
table.clone creates a soft copy of an existing table (any tables inside the table will still be references).
This sets up a basic loop to clone any tables within a table and create deep copies.