File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
src/main/ruby/truffleruby/post-boot Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change 71
71
if old_home
72
72
# We need to fix all paths which capture the image build-time home to point
73
73
# to the runtime home.
74
+
75
+ paths_starting_with_home = [ ]
76
+ [ $LOAD_PATH, $LOADED_FEATURES] . each do |array |
77
+ array . each do |path |
78
+ if path . start_with? ( old_home )
79
+ paths_starting_with_home << path [ old_home . size ..-1 ]
80
+ end
81
+ end
82
+ end
83
+ old_home = nil
84
+
74
85
Truffle ::Boot . delay do
75
86
new_home = Truffle ::Boot . ruby_home
76
- [ $LOAD_PATH, $LOADED_FEATURES] . each do |array |
77
- array . each do |path |
78
- if path . start_with? ( old_home )
79
- path . replace ( new_home + path [ old_home . size ..-1 ] )
80
- end
81
- end
87
+ paths_starting_with_home . each do |path |
88
+ path . replace ( new_home + path )
82
89
end
83
90
end
84
91
end
You can’t perform that action at this time.
0 commit comments