Hello community,

here is the log from the commit of package rubygem-bootsnap for 
openSUSE:Factory checked in at 2020-03-04 09:42:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-bootsnap (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-bootsnap.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-bootsnap"

Wed Mar  4 09:42:41 2020 rev:5 rq:781177 version:1.4.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-bootsnap/rubygem-bootsnap.changes        
2019-11-13 13:27:09.255624296 +0100
+++ 
/work/SRC/openSUSE:Factory/.rubygem-bootsnap.new.26092/rubygem-bootsnap.changes 
    2020-03-04 09:43:55.826054552 +0100
@@ -1,0 +2,7 @@
+Tue Mar  3 11:01:39 UTC 2020 - Manuel Schnitzer <[email protected]>
+
+- updated to version 1.4.6
+
+  * no changelog found
+
+-------------------------------------------------------------------

Old:
----
  bootsnap-1.4.5.gem

New:
----
  bootsnap-1.4.6.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-bootsnap.spec ++++++
--- /var/tmp/diff_new_pack.YCiTmU/_old  2020-03-04 09:44:00.678057460 +0100
+++ /var/tmp/diff_new_pack.YCiTmU/_new  2020-03-04 09:44:00.682057463 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-bootsnap
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,15 +24,15 @@
 #
 
 Name:           rubygem-bootsnap
-Version:        1.4.5
+Version:        1.4.6
 Release:        0
 %define mod_name bootsnap
 %define mod_full_name %{mod_name}-%{version}
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-BuildRequires:  %{rubydevel >= 2.0.0}
+BuildRequires:  %{rubydevel >= 2.3.0}
 BuildRequires:  %{rubygem gem2rpm}
 BuildRequires:  ruby-macros >= 5
-Url:            https://github.com/Shopify/bootsnap
+URL:            https://github.com/Shopify/bootsnap
 Source:         https://rubygems.org/gems/%{mod_full_name}.gem
 Source1:        gem2rpm.yml
 Summary:        Boot large ruby/rails apps faster

++++++ bootsnap-1.4.5.gem -> bootsnap-1.4.6.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.rubocop.yml new/.rubocop.yml
--- old/.rubocop.yml    2019-08-28 18:01:30.000000000 +0200
+++ new/.rubocop.yml    2020-02-24 21:40:20.000000000 +0100
@@ -5,7 +5,7 @@
   Exclude:
     - 'vendor/**/*'
     - 'tmp/**/*'
-  TargetRubyVersion: '2.2'
+  TargetRubyVersion: '2.3'
 
 # This doesn't take into account retrying from an exception
 Lint/HandleExceptions:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Gemfile new/Gemfile
--- old/Gemfile 2019-08-28 18:01:30.000000000 +0200
+++ new/Gemfile 2020-02-24 21:40:20.000000000 +0100
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 source 'https://rubygems.org'
 
 # Specify your gem's dependencies in bootsnap.gemspec
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.jp.md new/README.jp.md
--- old/README.jp.md    2019-08-28 18:01:30.000000000 +0200
+++ new/README.jp.md    2020-02-24 21:40:20.000000000 +0100
@@ -152,7 +152,7 @@
 Bootsnap 
は、64バイトのヘッダーとそれに続くキャッシュの内容を含んだキャッシュファイルを書き込みます。ヘッダーは、次のいくつかのフィールドで構成されるキャッシュキーです。
 
 - `version`、Bootsnapにハードコードされる基本的なスキーマのバージョン
-- `os_version`、(macOS, BSDの) 現在のカーネルバージョンか 、(Linuxの) glibc のバージョンのハッシュ
+- 
`ruby_platform`、`RUBY_PLATFORM`(x86_64-linux-gnuなど)変数とglibcバージョン(Linuxの場合)またはOSバージョン(BSD、macOSの場合は`
 uname -v`)のハッシュ
 - `compile_option`、`RubyVM::InstructionSequence.compile_option` の返り値
 - `ruby_revision`、コンパイルされたRubyのバージョン
 - `size`、ソースファイルのサイズ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       2019-08-28 18:01:30.000000000 +0200
+++ new/README.md       2020-02-24 21:40:20.000000000 +0100
@@ -214,7 +214,7 @@
 is a cache key including several fields:
 
 * `version`, hardcoded in bootsnap. Essentially a schema version;
-* `os_version`, A hash of the current kernel version (on macOS, BSD) or glibc 
version (on Linux);
+* `ruby_platform`, A hash of `RUBY_PLATFORM` (e.g. x86_64-linux-gnu) variable 
and glibc version (on Linux) or OS version (`uname -v` on BSD, macOS)
 * `compile_option`, which changes with 
`RubyVM::InstructionSequence.compile_option` does;
 * `ruby_revision`, the version of Ruby this was compiled with;
 * `size`, the size of the source file;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Rakefile new/Rakefile
--- old/Rakefile        2019-08-28 18:01:30.000000000 +0200
+++ new/Rakefile        2020-02-24 21:40:20.000000000 +0100
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 require('rake/extensiontask')
 require('bundler/gem_tasks')
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bin/console new/bin/console
--- old/bin/console     2019-08-28 18:01:30.000000000 +0200
+++ new/bin/console     2020-02-24 21:40:20.000000000 +0100
@@ -1,4 +1,5 @@
 #!/usr/bin/env ruby
+# frozen_string_literal: true
 
 require("bundler/setup")
 require("bootsnap")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bootsnap.gemspec new/bootsnap.gemspec
--- old/bootsnap.gemspec        2019-08-28 18:01:30.000000000 +0200
+++ new/bootsnap.gemspec        2020-02-24 21:40:20.000000000 +0100
@@ -1,4 +1,5 @@
 # coding: utf-8
+# frozen_string_literal: true
 lib = File.expand_path('../lib', __FILE__)
 $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
 require('bootsnap/version')
@@ -26,7 +27,7 @@
   end
   spec.require_paths = %w(lib)
 
-  spec.required_ruby_version = '>= 2.0.0'
+  spec.required_ruby_version = '>= 2.3.0'
 
   if RUBY_PLATFORM =~ /java/
     spec.platform = 'java'
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/bootsnap/bootsnap.c new/ext/bootsnap/bootsnap.c
--- old/ext/bootsnap/bootsnap.c 2019-08-28 18:01:30.000000000 +0200
+++ new/ext/bootsnap/bootsnap.c 2020-02-24 21:40:20.000000000 +0100
@@ -21,6 +21,9 @@
 #ifndef _WIN32
 #include <sys/utsname.h>
 #endif
+#ifdef __GLIBC__
+#include <gnu/libc-version.h>
+#endif
 
 /* 1000 is an arbitrary limit; FNV64 plus some slashes brings the cap down to
  * 981 for the cache dir */
@@ -90,12 +93,12 @@
 
 /* Helpers */
 static uint64_t fnv1a_64(const char *str);
-static void bs_cache_path(const char * cachedir, const char * path, char ** 
cache_path);
+static void bs_cache_path(const char * cachedir, const char * path, char (* 
cache_path)[MAX_CACHEPATH_SIZE]);
 static int bs_read_key(int fd, struct bs_cache_key * key);
 static int cache_key_equal(struct bs_cache_key * k1, struct bs_cache_key * k2);
 static VALUE bs_fetch(char * path, VALUE path_v, char * cache_path, VALUE 
handler);
-static int open_current_file(char * path, struct bs_cache_key * key, char ** 
errno_provenance);
-static int fetch_cached_data(int fd, ssize_t data_size, VALUE handler, VALUE * 
output_data, int * exception_tag, char ** errno_provenance);
+static int open_current_file(char * path, struct bs_cache_key * key, const 
char ** errno_provenance);
+static int fetch_cached_data(int fd, ssize_t data_size, VALUE handler, VALUE * 
output_data, int * exception_tag, const char ** errno_provenance);
 static uint32_t get_ruby_revision(void);
 static uint32_t get_ruby_platform(void);
 
@@ -236,6 +239,9 @@
 
 #ifdef _WIN32
   return (uint32_t)(hash >> 32) ^ (uint32_t)GetVersion();
+#elif defined(__GLIBC__)
+  hash = fnv1a_64_iter(hash, gnu_get_libc_version());
+  return (uint32_t)(hash >> 32);
 #else
   struct utsname utsname;
 
@@ -256,7 +262,7 @@
  * The path will look something like: <cachedir>/12/34567890abcdef
  */
 static void
-bs_cache_path(const char * cachedir, const char * path, char ** cache_path)
+bs_cache_path(const char * cachedir, const char * path, char (* 
cache_path)[MAX_CACHEPATH_SIZE])
 {
   uint64_t hash = fnv1a_64(path);
 
@@ -308,10 +314,8 @@
   char * path     = RSTRING_PTR(path_v);
   char cache_path[MAX_CACHEPATH_SIZE];
 
-  { /* generate cache path to cache_path */
-    char * tmp = (char *)&cache_path;
-    bs_cache_path(cachedir, path, &tmp);
-  }
+  /* generate cache path to cache_path */
+  bs_cache_path(cachedir, path, &cache_path);
 
   return bs_fetch(path, path_v, cache_path, handler);
 }
@@ -321,14 +325,14 @@
  * was loaded.
  */
 static int
-open_current_file(char * path, struct bs_cache_key * key, char ** 
errno_provenance)
+open_current_file(char * path, struct bs_cache_key * key, const char ** 
errno_provenance)
 {
   struct stat statbuf;
   int fd;
 
   fd = open(path, O_RDONLY);
   if (fd < 0) {
-    *errno_provenance = (char *)"bs_fetch:open_current_file:open";
+    *errno_provenance = "bs_fetch:open_current_file:open";
     return fd;
   }
   #ifdef _WIN32
@@ -336,7 +340,7 @@
   #endif
 
   if (fstat(fd, &statbuf) < 0) {
-    *errno_provenance = (char *)"bs_fetch:open_current_file:fstat";
+    *errno_provenance = "bs_fetch:open_current_file:fstat";
     close(fd);
     return -1;
   }
@@ -382,13 +386,13 @@
  *   - ERROR_WITH_ERRNO (-1, errno is set)
  */
 static int
-open_cache_file(const char * path, struct bs_cache_key * key, char ** 
errno_provenance)
+open_cache_file(const char * path, struct bs_cache_key * key, const char ** 
errno_provenance)
 {
   int fd, res;
 
   fd = open(path, O_RDONLY);
   if (fd < 0) {
-    *errno_provenance = (char *)"bs_fetch:open_cache_file:open";
+    *errno_provenance = "bs_fetch:open_cache_file:open";
     if (errno == ENOENT) return CACHE_MISSING_OR_INVALID;
     return ERROR_WITH_ERRNO;
   }
@@ -398,7 +402,7 @@
 
   res = bs_read_key(fd, key);
   if (res < 0) {
-    *errno_provenance = (char *)"bs_fetch:open_cache_file:read";
+    *errno_provenance = "bs_fetch:open_cache_file:read";
     close(fd);
     return res;
   }
@@ -422,7 +426,7 @@
  * or exception, will be the final data returnable to the user.
  */
 static int
-fetch_cached_data(int fd, ssize_t data_size, VALUE handler, VALUE * 
output_data, int * exception_tag, char ** errno_provenance)
+fetch_cached_data(int fd, ssize_t data_size, VALUE handler, VALUE * 
output_data, int * exception_tag, const char ** errno_provenance)
 {
   char * data = NULL;
   ssize_t nread;
@@ -431,7 +435,7 @@
   VALUE storage_data;
 
   if (data_size > 100000000000) {
-    *errno_provenance = (char *)"bs_fetch:fetch_cached_data:datasize";
+    *errno_provenance = "bs_fetch:fetch_cached_data:datasize";
     errno = EINVAL; /* because wtf? */
     ret = -1;
     goto done;
@@ -439,7 +443,7 @@
   data = ALLOC_N(char, data_size);
   nread = read(fd, data, data_size);
   if (nread < 0) {
-    *errno_provenance = (char *)"bs_fetch:fetch_cached_data:read";
+    *errno_provenance = "bs_fetch:fetch_cached_data:read";
     ret = -1;
     goto done;
   }
@@ -491,7 +495,7 @@
  * path.
  */
 static int
-atomic_write_cache_file(char * path, struct bs_cache_key * key, VALUE data, 
char ** errno_provenance)
+atomic_write_cache_file(char * path, struct bs_cache_key * key, VALUE data, 
const char ** errno_provenance)
 {
   char template[MAX_CACHEPATH_SIZE + 20];
   char * tmp_path;
@@ -505,12 +509,12 @@
   fd = mkstemp(tmp_path);
   if (fd < 0) {
     if (mkpath(tmp_path, 0775) < 0) {
-      *errno_provenance = (char *)"bs_fetch:atomic_write_cache_file:mkpath";
+      *errno_provenance = "bs_fetch:atomic_write_cache_file:mkpath";
       return -1;
     }
     fd = open(tmp_path, O_WRONLY | O_CREAT, 0664);
     if (fd < 0) {
-      *errno_provenance = (char *)"bs_fetch:atomic_write_cache_file:open";
+      *errno_provenance = "bs_fetch:atomic_write_cache_file:open";
       return -1;
     }
   }
@@ -521,11 +525,11 @@
   key->data_size = RSTRING_LEN(data);
   nwrite = write(fd, key, KEY_SIZE);
   if (nwrite < 0) {
-    *errno_provenance = (char *)"bs_fetch:atomic_write_cache_file:write";
+    *errno_provenance = "bs_fetch:atomic_write_cache_file:write";
     return -1;
   }
   if (nwrite != KEY_SIZE) {
-    *errno_provenance = (char *)"bs_fetch:atomic_write_cache_file:keysize";
+    *errno_provenance = "bs_fetch:atomic_write_cache_file:keysize";
     errno = EIO; /* Lies but whatever */
     return -1;
   }
@@ -533,7 +537,7 @@
   nwrite = write(fd, RSTRING_PTR(data), RSTRING_LEN(data));
   if (nwrite < 0) return -1;
   if (nwrite != RSTRING_LEN(data)) {
-    *errno_provenance = (char *)"bs_fetch:atomic_write_cache_file:writelength";
+    *errno_provenance = "bs_fetch:atomic_write_cache_file:writelength";
     errno = EIO; /* Lies but whatever */
     return -1;
   }
@@ -541,12 +545,12 @@
   close(fd);
   ret = rename(tmp_path, path);
   if (ret < 0) {
-    *errno_provenance = (char *)"bs_fetch:atomic_write_cache_file:rename";
+    *errno_provenance = "bs_fetch:atomic_write_cache_file:rename";
     return -1;
   }
   ret = chmod(path, 0664 & ~current_umask);
   if (ret < 0) {
-    *errno_provenance = (char *)"bs_fetch:atomic_write_cache_file:chmod";
+    *errno_provenance = "bs_fetch:atomic_write_cache_file:chmod";
   }
   return ret;
 }
@@ -555,13 +559,13 @@
 /* Read contents from an fd, whose contents are asserted to be +size+ bytes
  * long, into a buffer */
 static ssize_t
-bs_read_contents(int fd, size_t size, char ** contents, char ** 
errno_provenance)
+bs_read_contents(int fd, size_t size, char ** contents, const char ** 
errno_provenance)
 {
   ssize_t nread;
   *contents = ALLOC_N(char, size);
   nread = read(fd, *contents, size);
   if (nread < 0) {
-    *errno_provenance = (char *)"bs_fetch:bs_read_contents:read";
+    *errno_provenance = "bs_fetch:bs_read_contents:read";
   }
   return nread;
 }
@@ -617,7 +621,7 @@
   char * contents = NULL;
   int cache_fd = -1, current_fd = -1;
   int res, valid_cache = 0, exception_tag = 0;
-  char * errno_provenance = NULL;
+  const char * errno_provenance = NULL;
 
   VALUE input_data;   /* data read from source file, e.g. YAML or ruby source 
*/
   VALUE storage_data; /* compiled data, e.g. msgpack / binary iseq */
@@ -685,7 +689,7 @@
    * using input_to_output */
   if (NIL_P(output_data)) {
     if (unlink(cache_path) < 0) {
-      errno_provenance = (char *)"bs_fetch:unlink";
+      errno_provenance = "bs_fetch:unlink";
       goto fail_errno;
     }
     bs_input_to_output(handler, input_data, &output_data, &exception_tag);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/bootsnap/extconf.rb new/ext/bootsnap/extconf.rb
--- old/ext/bootsnap/extconf.rb 2019-08-28 18:01:30.000000000 +0200
+++ new/ext/bootsnap/extconf.rb 2020-02-24 21:40:20.000000000 +0100
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 require("mkmf")
 $CFLAGS << ' -O3 '
 $CFLAGS << ' -std=c99'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bootsnap/bundler.rb new/lib/bootsnap/bundler.rb
--- old/lib/bootsnap/bundler.rb 2019-08-28 18:01:30.000000000 +0200
+++ new/lib/bootsnap/bundler.rb 2020-02-24 21:40:20.000000000 +0100
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 module Bootsnap
   extend(self)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bootsnap/compile_cache/iseq.rb 
new/lib/bootsnap/compile_cache/iseq.rb
--- old/lib/bootsnap/compile_cache/iseq.rb      2019-08-28 18:01:30.000000000 
+0200
+++ new/lib/bootsnap/compile_cache/iseq.rb      2020-02-24 21:40:20.000000000 
+0100
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 require('bootsnap/bootsnap')
 require('zlib')
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bootsnap/compile_cache/yaml.rb 
new/lib/bootsnap/compile_cache/yaml.rb
--- old/lib/bootsnap/compile_cache/yaml.rb      2019-08-28 18:01:30.000000000 
+0200
+++ new/lib/bootsnap/compile_cache/yaml.rb      2020-02-24 21:40:20.000000000 
+0100
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 require('bootsnap/bootsnap')
 
 module Bootsnap
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bootsnap/compile_cache.rb 
new/lib/bootsnap/compile_cache.rb
--- old/lib/bootsnap/compile_cache.rb   2019-08-28 18:01:30.000000000 +0200
+++ new/lib/bootsnap/compile_cache.rb   2020-02-24 21:40:20.000000000 +0100
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 module Bootsnap
   module CompileCache
     Error           = Class.new(StandardError)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bootsnap/explicit_require.rb 
new/lib/bootsnap/explicit_require.rb
--- old/lib/bootsnap/explicit_require.rb        2019-08-28 18:01:30.000000000 
+0200
+++ new/lib/bootsnap/explicit_require.rb        2020-02-24 21:40:20.000000000 
+0100
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 module Bootsnap
   module ExplicitRequire
     ARCHDIR    = RbConfig::CONFIG['archdir']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bootsnap/load_path_cache/cache.rb 
new/lib/bootsnap/load_path_cache/cache.rb
--- old/lib/bootsnap/load_path_cache/cache.rb   2019-08-28 18:01:30.000000000 
+0200
+++ new/lib/bootsnap/load_path_cache/cache.rb   2020-02-24 21:40:20.000000000 
+0100
@@ -67,7 +67,7 @@
           # native dynamic extension, e.g. .bundle or .so), we know it was a
           # failure and there's nothing more we can do to find the file.
           # no extension, .rb, (.bundle or .so)
-          when '', *CACHED_EXTENSIONS # rubocop:disable 
Performance/CaseWhenSplat
+          when '', *CACHED_EXTENSIONS
             nil
           # Ruby allows specifying native extensions as '.so' even when DLEXT
           # is '.bundle'. This is where we handle that case.
@@ -144,7 +144,7 @@
             expanded_path = p.expanded_path
             entries, dirs = p.entries_and_dirs(@store)
             # push -> low precedence -> set only if unset
-            dirs.each    { |dir| @dirs[dir]  ||= path }
+            dirs.each    { |dir| @dirs[dir] ||= path }
             entries.each { |rel| @index[rel] ||= expanded_path }
           end
         end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bootsnap/load_path_cache/change_observer.rb 
new/lib/bootsnap/load_path_cache/change_observer.rb
--- old/lib/bootsnap/load_path_cache/change_observer.rb 2019-08-28 
18:01:30.000000000 +0200
+++ new/lib/bootsnap/load_path_cache/change_observer.rb 2020-02-24 
21:40:20.000000000 +0100
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 module Bootsnap
   module LoadPathCache
     module ChangeObserver
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/bootsnap/load_path_cache/core_ext/active_support.rb 
new/lib/bootsnap/load_path_cache/core_ext/active_support.rb
--- old/lib/bootsnap/load_path_cache/core_ext/active_support.rb 2019-08-28 
18:01:30.000000000 +0200
+++ new/lib/bootsnap/load_path_cache/core_ext/active_support.rb 2020-02-24 
21:40:20.000000000 +0100
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 module Bootsnap
   module LoadPathCache
     module CoreExt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb 
new/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb
--- old/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb 2019-08-28 
18:01:30.000000000 +0200
+++ new/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb 2020-02-24 
21:40:20.000000000 +0100
@@ -1,8 +1,9 @@
+# frozen_string_literal: true
 module Bootsnap
   module LoadPathCache
     module CoreExt
       def self.make_load_error(path)
-        err = LoadError.new("cannot load such file -- #{path}")
+        err = LoadError.new(+"cannot load such file -- #{path}")
         err.instance_variable_set(Bootsnap::LoadPathCache::ERROR_TAG_IVAR, 
true)
         err.define_singleton_method(:path) { path }
         err
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/bootsnap/load_path_cache/core_ext/loaded_features.rb 
new/lib/bootsnap/load_path_cache/core_ext/loaded_features.rb
--- old/lib/bootsnap/load_path_cache/core_ext/loaded_features.rb        
2019-08-28 18:01:30.000000000 +0200
+++ new/lib/bootsnap/load_path_cache/core_ext/loaded_features.rb        
2020-02-24 21:40:20.000000000 +0100
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 class << $LOADED_FEATURES
   alias_method(:delete_without_bootsnap, :delete)
   def delete(key)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/bootsnap/load_path_cache/loaded_features_index.rb 
new/lib/bootsnap/load_path_cache/loaded_features_index.rb
--- old/lib/bootsnap/load_path_cache/loaded_features_index.rb   2019-08-28 
18:01:30.000000000 +0200
+++ new/lib/bootsnap/load_path_cache/loaded_features_index.rb   2020-02-24 
21:40:20.000000000 +0100
@@ -40,7 +40,7 @@
             # /a/b/lib/my/foo.rb
             #          ^^^^^^^^^
             short = feat[(lpe.length + 1)..-1]
-            stripped = strip_extension(short)
+            stripped = strip_extension_if_elidable(short)
             @lfi[short] = hash
             @lfi[stripped] = hash
           end
@@ -94,13 +94,14 @@
 
         hash = long.hash
 
-        # do we have 'bundler' or 'bundler.rb'?
-        altname = if File.extname(short) != ''
-          # strip the path from 'bundler.rb' -> 'bundler'
-          strip_extension(short)
+        # Do we have a filename with an elidable extension, e.g.,
+        # 'bundler.rb', or 'libgit2.so'?
+        altname = if extension_elidable?(short)
+          # Strip the extension off, e.g. 'bundler.rb' -> 'bundler'.
+          strip_extension_if_elidable(short)
         elsif long && (ext = File.extname(long))
-          # get the extension from the expanded path if given
-          # 'bundler' + '.rb'
+          # We already know the extension of the actual file this
+          # resolves to, so put that back on.
           short + ext
         end
 
@@ -117,8 +118,30 @@
       STRIP_EXTENSION = /\.[^.]*?$/
       private_constant(:STRIP_EXTENSION)
 
-      def strip_extension(f)
-        f.sub(STRIP_EXTENSION, '')
+      # Might Ruby automatically search for this extension if
+      # someone tries to 'require' the file without it? E.g. Ruby
+      # will implicitly try 'x.rb' if you ask for 'x'.
+      #
+      # This is complex and platform-dependent, and the Ruby docs are a little
+      # handwavy about what will be tried when and in what order.
+      # So optimistically pretend that all known elidable extensions
+      # will be tried on all platforms, and that people are unlikely
+      # to name files in a way that assumes otherwise.
+      # (E.g. It's unlikely that someone will know that their code
+      # will _never_ run on MacOS, and therefore think they can get away
+      # with callling a Ruby file 'x.dylib.rb' and then requiring it as 
'x.dylib'.)
+      #
+      # See <https://ruby-doc.org/core-2.6.4/Kernel.html#method-i-require>.
+      def extension_elidable?(f)
+        f.to_s.end_with?('.rb', '.so', '.o', '.dll', '.dylib')
+      end
+
+      def strip_extension_if_elidable(f)
+        if extension_elidable?(f)
+          f.sub(STRIP_EXTENSION, '')
+        else
+          f
+        end
       end
     end
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bootsnap/load_path_cache/path.rb 
new/lib/bootsnap/load_path_cache/path.rb
--- old/lib/bootsnap/load_path_cache/path.rb    2019-08-28 18:01:30.000000000 
+0200
+++ new/lib/bootsnap/load_path_cache/path.rb    2020-02-24 21:40:20.000000000 
+0100
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 require_relative('path_scanner')
 
 module Bootsnap
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bootsnap/load_path_cache/store.rb 
new/lib/bootsnap/load_path_cache/store.rb
--- old/lib/bootsnap/load_path_cache/store.rb   2019-08-28 18:01:30.000000000 
+0200
+++ new/lib/bootsnap/load_path_cache/store.rb   2020-02-24 21:40:20.000000000 
+0100
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 require_relative('../explicit_require')
 
 Bootsnap::ExplicitRequire.with_gems('msgpack') { require('msgpack') }
@@ -63,11 +64,11 @@
       def load_data
         @data = begin
           MessagePack.load(File.binread(@store_path))
-          # handle malformed data due to upgrade incompatability
-        rescue Errno::ENOENT, MessagePack::MalformedFormatError, 
MessagePack::UnknownExtTypeError, EOFError
-          {}
-        rescue ArgumentError => e
-          e.message =~ /negative array size/ ? {} : raise
+                # handle malformed data due to upgrade incompatability
+                rescue Errno::ENOENT, MessagePack::MalformedFormatError, 
MessagePack::UnknownExtTypeError, EOFError
+                  {}
+                rescue ArgumentError => e
+                  e.message =~ /negative array size/ ? {} : raise
         end
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bootsnap/setup.rb new/lib/bootsnap/setup.rb
--- old/lib/bootsnap/setup.rb   2019-08-28 18:01:30.000000000 +0200
+++ new/lib/bootsnap/setup.rb   2020-02-24 21:40:20.000000000 +0100
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 require_relative('../bootsnap')
 
 env = ENV['RAILS_ENV'] || ENV['RACK_ENV'] || ENV['ENV']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bootsnap/version.rb new/lib/bootsnap/version.rb
--- old/lib/bootsnap/version.rb 2019-08-28 18:01:30.000000000 +0200
+++ new/lib/bootsnap/version.rb 2020-02-24 21:40:20.000000000 +0100
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 module Bootsnap
-  VERSION = "1.4.5"
+  VERSION = "1.4.6"
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/bootsnap.rb new/lib/bootsnap.rb
--- old/lib/bootsnap.rb 2019-08-28 18:01:30.000000000 +0200
+++ new/lib/bootsnap.rb 2020-02-24 21:40:20.000000000 +0100
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 require_relative('bootsnap/version')
 require_relative('bootsnap/bundler')
 require_relative('bootsnap/load_path_cache')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2019-08-28 18:01:30.000000000 +0200
+++ new/metadata        2020-02-24 21:40:20.000000000 +0100
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: bootsnap
 version: !ruby/object:Gem::Version
-  version: 1.4.5
+  version: 1.4.6
 platform: ruby
 authors:
 - Burke Libbey
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2019-08-28 00:00:00.000000000 Z
+date: 2020-02-24 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: bundler
@@ -160,14 +160,14 @@
   requirements:
   - - ">="
     - !ruby/object:Gem::Version
-      version: 2.0.0
+      version: 2.3.0
 required_rubygems_version: !ruby/object:Gem::Requirement
   requirements:
   - - ">="
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubygems_version: 3.0.2
+rubygems_version: 3.0.6
 signing_key: 
 specification_version: 4
 summary: Boot large ruby/rails apps faster


Reply via email to