Making object switch(...) return nil as a default if no default is specified
commit79348e2f386fe5a7b560265e9ec10f5833db83fa
authorJonathan Wright <jonathan@quag.geek.nz>
Sat, 26 May 2007 02:04:08 +0000 (26 14:04 +1200)
committerJonathan Wright <jonathan@quag.geek.nz>
Sat, 26 May 2007 02:04:08 +0000 (26 14:04 +1200)
tree0c8a04ad7dbb8c35a5d53dc95e3da3e7b0e08e45
parente17628854bbfd4685bb7a8f9f2d96ecc979af8f6
Making object switch(...) return nil as a default if no default is specified

Was
    Io> 3 switch(1, "one", 2, "two")
    ==> two

Now
    Io> 3 switch(1, "one", 2, "two")
    ==> nil

Also wrote some unit tests for switch and created libs/iovm/tests/SwitchTest.io
libs/iovm/io/A2_Object.io
libs/iovm/tests/ObjectTest.io
libs/iovm/tests/SwitchTest.io [new file with mode: 0644]