<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -240,7 +240,7 @@ function __rvm_use {
   if [[ ! -z &quot;$rvm_dump_flag&quot; ]] ; then __rvm_gems_dump ; fi
 }
 
-function __rvm_ruby_string {
+__rvm_ruby_string() {
   if [[ ! -z &quot;$rvm_ruby_string&quot; ]] ; then
     if [[ &quot;system&quot; = &quot;$rvm_ruby_string&quot; ]] ; then
       __rvm_unset_ruby_variables
@@ -259,8 +259,8 @@ function __rvm_ruby_string {
       rvm_ruby_version=$(echo $ruby_string |  awk -F'-' '{print $2}')
 
       if [[ &quot;$rvm_ruby_version&quot; != &quot;head&quot; ]] ; then
-        patch_level=$(echo $ruby_string |  awk -F'-' '{print $3}')
-        if [[ ! -z &quot;$patch_level&quot; ]] ; then rvm_ruby_patch_level=&quot;$patch_level&quot; ; fi
+        patch_level=$(echo $ruby_string |  awk -F'-p' '{print $2}')
+        if [[ ! -z &quot;$patch_level&quot; ]] ; then rvm_ruby_patch_level=&quot;p$patch_level&quot; ; fi
       else
         unset rvm_ruby_version
         rvm_head_flag=1
@@ -299,7 +299,9 @@ function __rvm_ruby_string {
         if [[ &quot;rbx&quot; = &quot;$rvm_ruby_interpreter&quot; ]] ; then unset rvm_ruby_patch_level ; fi
         if [[ &quot;mput&quot; = &quot;$rvm_ruby_interpreter&quot; ]] ; then unset rvm_ruby_patch_level ; fi
       else
-        revision=$(echo $ruby_string | awk -F'-' '{print $3}')
+        revision=$(echo $ruby_string | awk -F'-' '{print $NF}')
+        if [[ ! -z &quot;$patch_level&quot; ]] ; then rvm_ruby_patch_level=&quot;p$patch_level&quot; ; fi
+
         if [[ ! -z &quot;$revision&quot; ]] ; then
           if match &quot;$revision&quot; &quot;^p&quot; ; then
             rvm_ruby_patch_level=&quot;$revision&quot;</diff>
      <filename>scripts/selector</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>cf72a76b04f56c95e3b50b8311ea734eeface731</id>
    </parent>
  </parents>
  <author>
    <name>Wayne E. Seguin</name>
    <email>wayneeseguin@gmail.com</email>
  </author>
  <url>http://github.com/docwhat/rvm/commit/ca10613d9e5ea7036296862237e81826a071e487</url>
  <id>ca10613d9e5ea7036296862237e81826a071e487</id>
  <committed-date>2009-10-28T21:19:27-07:00</committed-date>
  <authored-date>2009-10-28T21:19:27-07:00</authored-date>
  <message>Bugfix: 'rvm 1.8.7-p160' now works.</message>
  <tree>1b7dc538b7c45009edc3da1124d53767efcb8f24</tree>
  <committer>
    <name>Wayne E. Seguin</name>
    <email>wayneeseguin@gmail.com</email>
  </committer>
</commit>
