Skip to content
Snippets Groups Projects
Commit 8067d729 authored by Alexander Polcyn's avatar Alexander Polcyn
Browse files

dont catch load error when loading grpc lib in grpc gem

parent 398dde49
No related branches found
No related tags found
No related merge requests found
...@@ -28,8 +28,12 @@ ...@@ -28,8 +28,12 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
begin begin
RUBY_VERSION =~ /(\d+\.\d+)/ ruby_version_dirname = /(\d+\.\d+)/.match(RUBY_VERSION)
require_relative "#{$1}/grpc_c" distrib_lib_dir = File.expand_path("#{ruby_version_dirname}/grpc_c",
rescue LoadError File.dirname(__FILE__))
require_relative 'grpc_c' if File.directory?(distrib_lib_dir)
require_relative "#{distrib_lib_dir}/grpc_c"
else
require_relative 'grpc_c'
end
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment