I was exploring an underground mineshaft, when I noticed zombies in the shaft ahead. The closest one was standing in between the fence supports and was looking at me, but was not moving. In front of him were several rails. I tried moving side to side, to see if he would follow, but he simply stood there. He only started moving after I destroyed the rail. Later on, in another section, two zombies and a creeper were blocked by the rail, and walked around it as if it were a fence blocking the way. Spiders were partially affected, though jumping on it they would pause and begin acting as if under full sunlight for a moment before attempting to attack again. Mineshaft was located in Swampland biome.
Linked issues
is duplicated by
relates to
Comments

So, if I hit the mob, it bounces back, attempting to pursue me, and stops right on the rail, it isn't pursuing me?

Reopened.
it is still bugged in 1.7.2. i realised that i can attack zombie pigmen this way easily, making a gold farm.
I don't get this, on one hand I always bump in to zombie pigmen when I use minecarts in the nether eventhough they have enough space to move away, on the other hand, rails are effective at keeping mobs out of a perimeter. I need to do some testing.
Guys, this needs to be reopened. I am using version 1.11. I can confirm hostile mobs are not crossing rails, ever as far as I can tell. They chase me and then stop like they are walls. But they still can see me. I can hit them too and they still will not cross the rails. This applies to all mobs I have seen so far, zombies, creepers, skelektons

I concur with Adam, IT LIVES. Hostile mobs or passive mobs (unless they have a more unique form of moving I imagine, like spiders) simply cannot cross any type of rails whether they be trying to attack, follow the food goody, or by will.
I've attempted zombies, creepers, spiders, vindicators, cows, and pigs, but this bug likely afflicts just about any AI that walks normally. I am in 1.11.
This ticket was resolved not because the behavior doesn't occur, but rather because it is intentional. If you look in the history, Dinnerbone resolved it as intended. This bug tracker exists so that Mojang can keep track of what issues they want to deal with, and they have decided that this is not an issue, so it is irrelevant whether the behavior still exists in 1.11.
What I read was the intended behavior is to not cross rails UNLESS a mob is chasing you. This is not the case. They never cross the rails. BTW, I know why this bug tracker exists.
Dinnerbone resolved it as WAI after the comment "So, if I hit the mob, it bounces back, attempting to pursue me, and stops right on the rail, it isn't pursuing me?" I take this to mean that Dinnerbone most likely saw the comment and thought that mobs stopping on rails while pursuing players was also intended.
The problem is that mojang added a fix to something that wasn't broken in the first place, and that's why this is marked as WAI. People will have better luck with suggesting the removal of this "fix" elsewhere rather than reporting it as a bug. I'm at a loss as to why this was done in the first place. Just mojang carrying clueless/careless players through the game I guess. How hard is it to build walls around a rail system to keep out mobs? It's bad coding practice to force a feature when other options are open to the player. If a mob gets in the way of a rail system, then the fault lies with the player, not the coding of the game.
@Aaron Rhodes I don't understand what your point is

His point is that it is the players to bring mobs to rail systems rather than the games fault to let the mobs not pass
According to me this doesn't makes any sense, because rail systems are naturrally generated in mineshafts, so players have no other choice than attacking them at the rail system. Also when players get attacked by mobs on their rail system, they have no other choice than fighting them there.
http://minecraft.gamepedia.com/Rails