desertexplorer nailed it with the photos. It is a nut from a track bolt. Used on jointed rail, securing two pieces of rail together, rail was made in 39' lengths if I remember, and were joined together by what are called either joint bars or angle bars, secured with track bolts and nuts. Rail took a heavy pounding at these joints, and the ends of rails are often somewhat mashed. With expansion and contraction, track bolts have been known to break from wear and extreme contraction, causing what is known as a "pull-apart" making a point where a derailment would most likely happen. To much expansion from heat with not enough gap between rails, and with weak ballast, somewhere along the line you could end up with a "Track buckle", or what now is referred to as a "Sun Kink", where again, Derailment. Joint bars are still used today, in many older rail yards, branch lines etc. The nuts and bolts them selves are inserted alternately, so on a six hole joint bar you have 3 nuts on each side, just in case a train wheel is on the ground being dragged, it would only shear off 3 nuts not all six. In that assembly, you also have the track "washers" which you can see in the pictures, and the two wires near the top side of the rail are what is called "bond wires", to connect the conductivity of the rail for the track signals. Most ALL Main line rail today are made of 1/4 mile length rail, referred to as "continuous welded rail" CWR., and they are joined together by a "Boutey" weld, (I do not know the right spelling for that weld) it is a procedure basically making a mold, filling it with what I'll call metal granule's or something, lighting it up, where it creates a liquid metal to I think about 5000 degrees? and fills the mold, cools, mold removed, grinded, (This whole thing MUST be done right) and then, one long piece of rail with no joints. Joint bars are still used though switches and often crossings. Now, expansion and contraction on CWR is done by a rather involved formula while laying the new rail. A chart is used showing different parts of the country and the common range of temperature, and a piece of track equipment on the steel gang called a "rail heater" is used to heat the rail to cause expansion at a certain temp. according to whatever is called for. A rail heater is a large propane tank with burners mounted just above the rails moving down the track slowly along with other equipment operated by one guy. Has gotten more "high tech" now, in the past they were more like large bombs on wheels, and the amount of heat was pretty much just guess work, although the narrow ledge? running just above the burners was a really dandy place for guys heating up a lunch wrapped in tin foil, or drying out gloves in the winter. WAY WAY more then you wanted to know about a rusty "Track Nut" for a angle bar.