Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
no result with glob pattern "\\" #5333
jruby 220.127.116.11-SNAPSHOT (2.5.0) 2018-09-28 8e6904f Java HotSpot(TM) 64-Bit Server VM 25.181-b13 on 1.8.0_181-b13 +jit [linux-x86_64]
Confirmed locally on master. Note that it works if the
Perhaps a simple issue with normalizing path separators?
Ok so I'm dumping my research since I don't know if I'll fix this over the weekend.
The logic that cleans up this rogue slash is from MRI glob_helper function, which largely has an equivalent in JRuby...except that the logic is ordered somewhat differently.
In MRI, glob_helper scans the whole set of path chunks for magic characters, and then has two separate branches to process them with and without magic. In JRuby, we check each segment for magic characters separately, but when there's no magic we do not process the segment and simply advance.
I think this may be possible to fix by considering backslash characters to be "magic" when escaping is on. I tried adding an "else" branch to the magic check that cleans up slashes, but it appears to break other things and there's a lot of missing logic in that else branch on MRI.