aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2016-08-19 22:32:24 +0200
committerGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2016-08-19 22:32:24 +0200
commit47127507bee18ed701a4c6be7748f4f72d35117d (patch)
tree659d8a99cc7bbb39d1d490cb82a9464639f72547 /src
parentbfe947c4af9da8e63edc294c7ba53b7a4a0ace53 (diff)
Fixing loading precompiled Ruby extension on 2.x.10+
Diffstat (limited to 'src')
-rw-r--r--src/ruby/lib/grpc/grpc.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ruby/lib/grpc/grpc.rb b/src/ruby/lib/grpc/grpc.rb
index b60a828d66..720e821619 100644
--- a/src/ruby/lib/grpc/grpc.rb
+++ b/src/ruby/lib/grpc/grpc.rb
@@ -28,7 +28,8 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
begin
- require_relative "#{RUBY_VERSION.sub(/\.\d$/, '')}/grpc_c"
+ RUBY_VERSION =~ /(\d+\.\d+)/
+ require "#{$1}/grpc_c"
rescue LoadError
require_relative 'grpc_c'
end