-
- Notifications
You must be signed in to change notification settings - Fork 395
Description
Good day, as you know, I'm the crazy MinGW guy. At present, using make test-spec has two failures. Running mspec has no failures.
I believe you touched on the issue of varying build systems in a ruby-lang issue. Well, here's another. I've mostly been building 2.5 trunk, but for various reasons, I've built other versions. So, I've got a git repo of ruby, and that is the source for my build system.
Since my system is loosely based on the MSYS2 / MinGW packaging system, I have a symlink for src within the standard build system folders to the ruby git repo folder.
Hence, the two failures, where realdirpath and realpath do not match __FILE__.
Would you accept a patch that allows the two tests to determine if __FILE__ is a symlink?
A method like the following does so:
fn = 'E:/GitHub/ruby-loco/src/ruby/spec/rubyspec/core/file/realdirpath_spec.rb' real = File.realdirpath(fn) #real = File.realpath(fn) def symlink_in_path?(fn) fn_strip = fn.dup found_symlink = false while fn_temp = File.dirname(fn_strip) do found_symlink = File.symlink?(fn_temp) break if found_symlink || fn_temp == fn_strip # reached last dir or drive fn_strip = fn_temp end found_symlink end if real != fn puts symlink_in_path?(fn) endOn Windows, one has to walk up the path to check for whether File.symlink? is true...