Top Level Namespace

Defined Under Namespace

Modules: Gitlab, Glaz

Instance Method Summary collapse

Instance Method Details

#load_rust_extensionObject

Native-gem installs ship a per-Ruby-ABI .so under lib/gitlab/glaz/<X.Y>/glaz.so. Source-gem installs (or local ‘rake compile` output) put it at lib/gitlab/glaz/glaz.so,bundle. Try the version-specific path first, fall back to the flat layout.



6
7
8
9
10
11
# File 'lib/gitlab/glaz/loader.rb', line 6

def load_rust_extension
  ruby_version = /(\d+\.\d+)/.match(RUBY_VERSION)
  require "gitlab/glaz/#{ruby_version}/glaz"
rescue LoadError
  require "gitlab/glaz/glaz"
end