浏览代码

Merge pull request #2001 from nicolasnoble/patch-1

Fixing regular expression...
Joshua Haberman 9 年之前
父节点
当前提交
b97a4a53cd
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      ruby/lib/google/protobuf.rb

+ 1 - 1
ruby/lib/google/protobuf.rb

@@ -45,7 +45,7 @@ if RUBY_PLATFORM == "java"
   require 'google/protobuf_java'
   require 'google/protobuf_java'
 else
 else
   begin
   begin
-    require "google/#{RUBY_VERSION.sub(/\.\d$/, '')}/protobuf_c"
+    require "google/#{RUBY_VERSION.sub(/\.\d+$/, '')}/protobuf_c"
   rescue LoadError
   rescue LoadError
     require 'google/protobuf_c'
     require 'google/protobuf_c'
   end
   end