Include JRuby's pom.xml file when updating version numbers
diff --git a/ruby/pom.xml b/ruby/pom.xml
index 0049858..b951845 100644
--- a/ruby/pom.xml
+++ b/ruby/pom.xml
@@ -1,7 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
       <groupId>com.google</groupId>
@@ -11,7 +9,7 @@
 
     <groupId>com.google.protobuf.jruby</groupId>
     <artifactId>protobuf-jruby</artifactId>
-    <version>1.0-SNAPSHOT</version>
+    <version>3.18.0</version>
     <name>Protocol Buffer JRuby native extension</name>
     <description>
       Protocol Buffers are a way of encoding structured data in an efficient yet
@@ -74,6 +72,12 @@
         </plugins>
     </build>
     <dependencies>
+        <!-- Ordering of dependencies matters to update_version.py -->
+        <dependency>
+          <groupId>com.google.protobuf</groupId>
+          <artifactId>protobuf-java-util</artifactId>
+          <version>3.18.0</version>
+        </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-core</artifactId>
@@ -85,10 +89,5 @@
             <version>9.2.11.1</version>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>com.google.protobuf</groupId>
-            <artifactId>protobuf-java-util</artifactId>
-            <version>3.18.0</version>
-        </dependency>
     </dependencies>
 </project>
diff --git a/update_version.py b/update_version.py
index 9cf1dbf..b96f715 100755
--- a/update_version.py
+++ b/update_version.py
@@ -358,6 +358,13 @@
       line))
 
 def UpdateRuby():
+  RewriteXml('ruby/pom.xml',
+             lambda document : ReplaceText(
+                 Find(document.documentElement, 'version'), GetFullVersion()))
+  RewriteXml('ruby/pom.xml',
+             lambda document : ReplaceText(
+                 Find(Find(Find(document.documentElement, 'dependencies'), 'dependency'), 'version'),
+                 GetFullVersion()))
   RewriteTextFile('ruby/google-protobuf.gemspec',
     lambda line : re.sub(
       r'^  s.version     = ".*"$',