diff --git a/ruby/lib/google/protobuf.rb b/ruby/lib/google/protobuf.rb index 62bdd1bf1a..9b8d8231e2 100644 --- a/ruby/lib/google/protobuf.rb +++ b/ruby/lib/google/protobuf.rb @@ -45,7 +45,7 @@ if RUBY_PLATFORM == "java" require 'google/protobuf_java' else begin - require "google/#{RUBY_VERSION.sub(/\.\d$/, '')}/protobuf_c" + require "google/#{RUBY_VERSION.sub(/\.\d+$/, '')}/protobuf_c" rescue LoadError require 'google/protobuf_c' end