I have both an 89 XJ and a 98 Ranger (well Mazda B4000).
The XJ has infinite possibilities when it comes to modifications and customizations
They are out there for the ranger, but nearly as plentiful.
Both ride like rucks, with solid rear axles, and a solid axle on the front of the jeep. I have stock suspension on the truck, and a VERY expensive but VERY good 3.5" lift kit on the XJ, and I think the XJ edges out the ranger for ride comfort. stock on both I would give it to the truck and a jeep lift kit on the XJ would give it to the truck in a hand basket.
The truck gets slightly better fuel economy, Both are wearing the same size tires (31's), but the truck has better gearing for it (3.73 vs 3.55) and a bit more power from a similar sized engine.
the truck is nice because you can haul a bunch of crap it in, but not as many people.
The XJ is nice because you can haul a bunch of people and a decent amount of stuff in it.
This is my XJ:
This is my B4000: