These are just rocks with gaps in-between, right? I wouldn't say that it's a fence. The wiki says that it's ok to map barrier=block on a line. 

For me it's a similar situation as with barrier=bollard. Check out the wiki on mapping them as a line https://wiki.openstreetmap.org/wiki/Tag:barrier=bollard