Work - Energy confusion when movement is vertical/up a slope I've always thought of work done on an object as the energy transferred to it. This explanation, however broke down when I came across the following situation :
A block of mass $m$ is transported to a height $h$ using these two methods:
a) Vertically pulled up using a slope

b) Just vertically pulled up

A question is asked that in which scenario (a or b) is more work done.
I followed my intuition and figured out that since the potential energy ($mgh$) is the same at the end of each of these scenarios, the work done must be the same.
However that isn't the case, more work is being done in scenario a.
This is quite obviously due to a logical fallacy in my understanding, is it not right to think about work this way? What is the part that I've overlooked in the work-energy relation?
(I know that $W=F\cdot d$ and $d$ is obviously greater in a than in b, so that just further muddies the puddle)
Edit 1: The slope is frictionless
Edit 2 : Following is the picture of the question that brought me thinking upon this topic.

 A: First, it is not always the case that $W=Fd$. This is only true if your force is constant and always directed along the displacement of the object on which the force is acting. In general, you need to do the line integral 
$$W=\int\mathbf F\cdot\text d\mathbf x$$
In this case we do not need to invoke calculus, but I just wanted you to be aware that $W=Fd$ or even $W=Fd\cos\theta$ requires certain conditions to be met before you use them.
Assuming $F$ is constant here (for a non-constant $F$, see @BobD's answer) you are actually correct in thinking something weird is going on here. Assuming the force is large enough to lift the block up in the vertical case, the force does do more work up the incline than in lifting the block vertically.
With that being said, there are some assumptions you are making between your two systems that you might not realize you are making. Let's say that you are using the same force $F$ in both cases. Then the work done by your force $F$ is only equal to the work gravity does (the negative change in gravitational potential energy, $mgh$) if the object has the same speed throughout its motion.$^*$ This means that $F$ has to be equal to the force pulling the object "down" (opposite the direction of motion). In your incline case, this force is $mg\sin\theta$ where $\theta$ is the angle of the incline. In the vertical case, this force is $mg$.
Therefore, if $F$ is equal to the "downward" force in one case, it is not equal to the "downward" force in the second case. More explicitly, if $F=mg\sin\theta$, then in the second case the force is not strong enough to lift the block. If $F=mg$, then in the first case the block will have a larger speed at the top of the incline than at the bottom. In either case, you cannot assume that the work done by you is equal to the work done by gravity in both scenarios. It can only be true in one scenario.
This is why at the beginning I said if the force is large enough to lift the block up in the vertical case, the force does do more work up the incline than in lifting the block vertically. If $F=mg$ then along the incline the work done by the force is $W=mgd$ and for the vertical case we have $W=mgh=mgd\sin\theta<mgd$. The extra energy you have supplied in the incline case goes into increasing the kinetic energy of the box as it moves up the incline.

$^*$Technically you just need the object to start and stop at the same speed. But if $F$ is constant, and because $mg$ is constant, then the only way this happens is if the object has a constant speed.
A: You are right that the work done should be the same, provided that there is no friction between the mass and the surface of the incline plane and for both cases the mass starts and ends at rest. But for that to happen the two forces cannot be constant and equal, because the force in (a) acts over a longer distance than the force in (b). The average force in (a) has to be less than the average force in (b). 
Hope this helps.
A: Assuming the pulling force is constant, there are different possible situations -


*

*If the pulling forces are same in both cases, then in (b), if you try to lift it up you need minimum force of magnitude $mg$, but the case (a) needs only $mg\sin\theta$ amount of force. So with more force than required it will have acceleration, and thus will get Kinetic Energy, you need to take in account for this.

*If you are providing the minimum required force to lift the object, then in case (b) work is $mgh$ and in (a) its $$mg\sin\theta \times \frac{h}{\sin\theta}= mgh$$ (force times distance) where $\theta$ is the angle of incline. Thus work is same and equal to $mgh$ in both cases.


And hence, saying 'work done on an object is the Energy transferred to it' is correct.
