If you try to move rail on the side of the block, it drops the item, but rail itself doesn't disappear.
What I expected to happen was...:
Rail gets destroyed by piston.
What actually happened was...:
Instead, rail drops the item, but doesn't disapper as a block.
Steps to Reproduce:
1. Put piston down.
2. In one block put, for example, sandstone.
3. Put rail on that sandstone.
4. Put rail in the empty space between the piston and sandstone.
5. Activate the piston.
This dupe works with any kind of rails and pistons.
Here are some screenshots to understand this a little bit better.