Added support for binary gems.
diff --git a/ruby/lib/google/protobuf.rb b/ruby/lib/google/protobuf.rb
index f0eb626..62bdd1b 100644
--- a/ruby/lib/google/protobuf.rb
+++ b/ruby/lib/google/protobuf.rb
@@ -44,7 +44,11 @@
   require 'json'
   require 'google/protobuf_java'
 else
-  require 'google/protobuf_c'
+  begin
+    require "google/#{RUBY_VERSION.sub(/\.\d$/, '')}/protobuf_c"
+  rescue LoadError
+    require 'google/protobuf_c'
+  end
 end
 
 require 'google/protobuf/repeated_field'