bytecode "rotate" has logic of "reverse"
Reported by Juha Pohjalainen | July 15th, 2008 @ 02:18 PM | in 1.0 preview
There is undocumented bytecode "rotate". If I understand it correctly, it is actually "reverse" (or its functionality is).
So that name seems to be misleading, since at least in Forth rotate has different meaning than reverse. Or maybe documentation could do it.
Comments and changes to this ticket
-
Evan Phoenix July 15th, 2008 @ 02:20 PM
To me (the author of the instruction) it has the correct logic :)
But yes, it needs to be documented.
-

Juha Pohjalainen July 15th, 2008 @ 02:29 PM
Ok. Hmm. Is that logic almost same as Array#reverse on partial array? Or what am I missing here?
-
Evan Phoenix July 15th, 2008 @ 02:32 PM
Sure, it's the same as Array#reverse. To me, it's an element rotation around the center, so that after it runs, the top is on the bottom and the bottom on the top.
-
Brian Ford December 2nd, 2008 @ 01:29 PM
- → State changed from new to resolved
This is documented in vm/instructions.rb.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
