Skip to content

Commit e580ae3

Browse files
committed
Convert objects with #to_path in $LOAD_PATH
* Fixes #2119
1 parent 150a1ae commit e580ae3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Compatibility:
4444
* Support refinements for `#to_s` called by string interpolation (#2110, @ssnickolay)
4545
* Module#using raises error in method scope (#2112, @ssnickolay)
4646
* `File#path` now returns a new mutable String on every call like MRI (#2115).
47+
* Convert objects with `#to_path` in `$LOAD_PATH` (#2119).
4748

4849
Performance:
4950

src/main/ruby/truffleruby/core/truffle/feature_loader.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def self.features_index_add(feature, offset)
279279

280280
def self.get_expanded_load_path
281281
unless Primitive.array_storage_equal?(@load_path_copy, $LOAD_PATH)
282-
@expanded_load_path = $LOAD_PATH.map { |path| Primitive.canonicalize_path(path) }
282+
@expanded_load_path = $LOAD_PATH.map { |path| Primitive.canonicalize_path(Truffle::Type.coerce_to_path(path)) }
283283
@loaded_features_copy = $LOAD_PATH.dup
284284
end
285285
@expanded_load_path

0 commit comments

Comments
 (0)