aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd/ruby.rb
blob: 2df212301479cd181d8d2a79ec205f61bf52be2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#:  * `ruby` [<ruby options>]:
#:    Run a Ruby instance with Homebrew's libraries loaded.
#:    For example:
#       brew ruby -e "puts :gcc.f.deps"
#       brew ruby script.rb

module Homebrew
  module_function

  def ruby
    exec ENV["HOMEBREW_RUBY_PATH"], "-I#{HOMEBREW_LIBRARY_PATH}", "-rglobal", "-rcmd/irb", *ARGV
  end
end