Skip to content

Commit c2f7b6c

Browse files
authored
Merge pull request #282 from stanhu/sh-improve-header-docs
Update documentation on os_version -> ruby_platform
2 parents 9278a85 + 70bef22 commit c2f7b6c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.jp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ close n
152152
Bootsnap は、64バイトのヘッダーとそれに続くキャッシュの内容を含んだキャッシュファイルを書き込みます。ヘッダーは、次のいくつかのフィールドで構成されるキャッシュキーです。
153153

154154
- `version`、Bootsnapにハードコードされる基本的なスキーマのバージョン
155-
- `os_version`、(macOS, BSDの) 現在のカーネルバージョンか 、(Linuxの) glibc のバージョンのハッシュ
155+
- `ruby_platform``RUBY_PLATFORM`(x86_64-linux-gnuなど)変数とOSバージョンのハッシュ(Linux、BSD、macOSでは` uname -v`
156156
- `compile_option``RubyVM::InstructionSequence.compile_option` の返り値
157157
- `ruby_revision`、コンパイルされたRubyのバージョン
158158
- `size`、ソースファイルのサイズ

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ Bootsnap writes a cache file containing a 64 byte header followed by the cache c
214214
is a cache key including several fields:
215215

216216
* `version`, hardcoded in bootsnap. Essentially a schema version;
217-
* `os_version`, A hash of the current kernel version (on macOS, BSD) or glibc version (on Linux);
217+
* `ruby_platform`, A hash of `RUBY_PLATFORM` (e.g. x86_64-linux-gnu) variable and OS version (`uname -v` on Linux, BSD, macOS)
218218
* `compile_option`, which changes with `RubyVM::InstructionSequence.compile_option` does;
219219
* `ruby_revision`, the version of Ruby this was compiled with;
220220
* `size`, the size of the source file;

test/compile_cache_key_format_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class CompileCacheKeyFormatTest < Minitest::Test
99

1010
R = {
1111
version: 0...4,
12-
os_version: 4...8,
12+
ruby_platform: 4...8,
1313
compile_option: 8...12,
1414
ruby_revision: 12...16,
1515
size: 16...24,

0 commit comments

Comments
 (0)