rails--rails/activesupport/test/core_ext/pathname
Jean Boussier 0ac4c04143 `Pathname.blank?` only returns true for `Pathname.new("")`
Fix: https://github.com/rails/rails/issues/44452

We don't ignore blank path strings because as surprising as it is, they
are valid paths:

```ruby
>> path = Pathname.new(" ")
=> #<Pathname: >
>> path.write("test")
=> 4
>> path.exist?
=> true
```

Previously it would end up calling `Pathname#empty?` which returned true
if the path existed and was an empty directory or file.

That behavior was unlikely to be expected.
2022-02-19 09:54:58 +01:00
..
blank_test.rb `Pathname.blank?` only returns true for `Pathname.new("")` 2022-02-19 09:54:58 +01:00
existence_test.rb