JohnEarnest / ok

An open-source interpreter for the K5 programming language.
MIT License
587 stars 72 forks source link

.slice[1] #53

Closed ngn closed 8 years ago

ngn commented 8 years ago

https://github.com/JohnEarnest/ok/blob/233c4bffa8b468d2a2c55b65bb47bbdcfa23e335/oK.js#L621 Square brackets look wrong there though the tests do cover that bit of code.

JohnEarnest commented 8 years ago

Wow, good catch! Must've been typing that function call while my brain was in K mode. I'm surprised that didn't cause overt issues.

JohnEarnest commented 8 years ago

It definitely doesn't have proper test coverage- you can just entirely elide env.put(ks(ds.v.slice[1]), true, d); and everything passes fine.

I'd need to spend some time wrapping my brain around this function to determine whether that fragment ought to be there at all.

JohnEarnest commented 8 years ago

As far as I can tell that code was vestigial. Removed it and simplified the surrounding routine.