From fadea4fe43eb1d0b1568410eb2b059cd096a6c59 Mon Sep 17 00:00:00 2001
From: Sorin Ionescu <sorin.ionescu@gmail.com>
Date: Wed, 28 Dec 2011 16:35:41 -0500
Subject: [PATCH] RubyGems GEM_PATH is not necessary to export.

---
 plugins/ruby/init.zsh | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/plugins/ruby/init.zsh b/plugins/ruby/init.zsh
index bf7f469..44114f9 100644
--- a/plugins/ruby/init.zsh
+++ b/plugins/ruby/init.zsh
@@ -3,21 +3,8 @@ if [[ "$OSTYPE" == darwin* ]]; then
   export GEM_HOME=$HOME/Library/Ruby/Gems/1.8
   path=("$GEM_HOME/bin" $path)
 
-  # gem is slow; cache its output.
-  cache_file="${0:h}/cache.zsh"
-  if [[ ! -f "$cache_file" ]]; then
-    print export GEM_PATH=$GEM_HOME:$(gem env gempath) >! "$cache_file"
-    source "$cache_file"
-  else
-    source "$cache_file"
-  fi
-  unset cache_file
-
   # Set environment variables for launchd processes.
-  for env_var in GEM_PATH GEM_HOME; do
-    launchctl setenv "$env_var" "${(P)env_var}" &!
-  done
-  unset env_var
+  launchctl setenv GEM_HOME "$GEM_HOME" &!
 fi
 
 # Loads RVM into the shell session.