Skip to content

Commit

Permalink
Fix/tweaks to rip ruby
Browse files Browse the repository at this point in the history
  • Loading branch information
defunkt committed Aug 17, 2009
1 parent 804b298 commit 468e6db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/rip/commands/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ module Rip
module Commands
o 'ruby ENV ARGS'
x 'Runs a Ruby instance in a particular environment.'
def ruby(options={}, *args)
selected_env = File.join(Rip.dir, ARGV.shift, "lib")
def ruby(options = {}, ripenv = '', *args)
selected_env = File.join(Rip.dir, ripenv, "lib")
path = (ENV["RUBYLIB"] || "").split(":")
active_env = File.join(Rip.dir, "active", "lib")
path -= [active_env]
path += [selected_env]
ENV["RUBYLIB"] = path.join(":")
exec(ENV['RUBYBIN'] || "ruby", *ARGV)
exec(ENV['RUBYBIN'] || "ruby", *args)
end
end
end

0 comments on commit 468e6db

Please sign in to comment.