If the dynamite is hooked up inside the barn, it is in rest with respect to moving pole and will perceive pole fitting inside the barn so it explodes. The person riding on the pole would rather be surprised to see dynamite exploding even when pole did not fit inside the barn. He probably will feel cheated at that moment.