I assume the second line is from the registry, and is either the the most recent install or the most current.
I recall that most exe’s search for dll files in their own directory before searching PATH. But, this still looks a little odd, and there are a few other .exe files in the SU root directory…
Agree, must be from registry, and must be the most recent as this machine (I am on) has SU8 thru SU2016 and the 1st path in ENV["PATH"]when running SU2013 is …
C:\Program Files\SketchUp\SketchUp 2016\
SU2013 was the last version running Ruby 1.8.6-p287 and did not have the standard lib distro’d with it, so this explains why the path into the “platform” lib directory is missing.
Agree , it is odd. I suppose it was added because there are some DLLs in there that extension authors may wish to load dynamically. (Just a guess though. but it really wasn’t needed by extension authors, as the “platform” path was already pushed into the $: array.)
The only other guess I could make is that SketchUp itself needed the path during it’s load cycle as it loads encoding support and rubygems etc., and they just never remove it afterward. (These paths are only added to SketchUp’s copy of the environment, so no harm to any other application.)
My memory is a little bit fuzzy on the reasons why. But I think Dan is correct with his guesses - in that we had to do that to allow the StdLib to correctly load within SketchUp.