ocran 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.txt +3 -0
- data/lib/ocran/direction.rb +17 -4
- data/lib/ocran/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e5b96c7de7250942c3f67b874546b10ff2ef0cb193e91f96c7c9736369937277
|
|
4
|
+
data.tar.gz: ef03135551cce98a71c1eb546c0717ee82031e7a2b1eddf73bb63ba06017ed4e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ba4c9a62f6a0c0cbcf88b6b7307df3777872e8cfb9a9b4e40352d0b8941dae0cf79d518c8ba4deea1eee2226137ecdcaf7cd2c575e0737f56db9f8e68907ab44
|
|
7
|
+
data.tar.gz: a43d0bd6b7e17b2c8120182468ec9f594ec2707f2cef0a8e086c1c5e33646e3e76606d4b4d6a93725d0a0b1517f5a77c4b8f0391a6e2be6fc5bfb99507b20cec
|
data/CHANGELOG.txt
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
=== 1.4.1
|
|
2
|
+
- Fix kernel_require.rb packed at wrong path when rubygems-update is installed (e.g. via asdf on Linux/macOS). kernel_require.rb is now located relative to the actually-loaded rubygems.rb from $LOADED_FEATURES, falling back to rubylibdir for standard Ruby installations.
|
|
3
|
+
|
|
1
4
|
=== 1.4.0
|
|
2
5
|
- Add Linux support: build and run self-extracting ELF executables on Linux. The stub compiles and runs natively on Linux using POSIX APIs.
|
|
3
6
|
- Add macOS support: build and run self-extracting Mach-O executables on macOS.
|
data/lib/ocran/direction.rb
CHANGED
|
@@ -100,12 +100,25 @@ module Ocran
|
|
|
100
100
|
# Since https://github.com/rubygems/rubygems/commit/cad4cf16cf8fcc637d9da643ef97cf0be2ed63cb
|
|
101
101
|
# rubygems/core_ext/kernel_require.rb is loaded via IO.read+eval rather than require,
|
|
102
102
|
# so it never appears in $LOADED_FEATURES and must be added manually.
|
|
103
|
-
#
|
|
104
|
-
#
|
|
103
|
+
# We check multiple candidate locations because the layout varies by Ruby setup:
|
|
104
|
+
# - Standard Ruby (including RubyInstaller on Windows): rubygems.rb lives in rubylibdir
|
|
105
|
+
# - Ruby with rubygems-update (e.g. asdf on Linux/macOS): rubygems.rb lives in site_ruby
|
|
106
|
+
# kernel_require.rb must be packed alongside the rubygems.rb that was actually loaded,
|
|
107
|
+
# because rubygems.rb uses require_relative to load it.
|
|
105
108
|
kernel_require_rel = "rubygems/core_ext/kernel_require.rb"
|
|
106
109
|
unless features.any? { |f| f.to_posix.end_with?(kernel_require_rel) }
|
|
107
|
-
|
|
108
|
-
features.
|
|
110
|
+
# Prefer the location alongside the actually-loaded rubygems.rb, fall back to rubylibdir
|
|
111
|
+
rubygems_feature = features.find { |f| f.to_posix.end_with?("/rubygems.rb") }
|
|
112
|
+
candidate_dirs = []
|
|
113
|
+
candidate_dirs << rubygems_feature.dirname if rubygems_feature
|
|
114
|
+
candidate_dirs << Pathname(RbConfig::CONFIG["rubylibdir"])
|
|
115
|
+
candidate_dirs.each do |base_dir|
|
|
116
|
+
kernel_require_path = base_dir / kernel_require_rel
|
|
117
|
+
if kernel_require_path.exist?
|
|
118
|
+
features.push(kernel_require_path)
|
|
119
|
+
break
|
|
120
|
+
end
|
|
121
|
+
end
|
|
109
122
|
end
|
|
110
123
|
|
|
111
124
|
# Convert all relative paths to absolute paths before building.
|
data/lib/ocran/version.rb
CHANGED