aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd/ruby.rb
diff options
context:
space:
mode:
authorMike McQuaid2018-02-27 13:05:06 +0000
committerGitHub2018-02-27 13:05:06 +0000
commit96cafb4124bf923e7cdef0693e00ab48cdc1dd24 (patch)
tree9e82c9878d286a3aab61a934f95b5bd2b687e764 /Library/Homebrew/dev-cmd/ruby.rb
parent7b365262ff356a059bb812c9e34478e04095ca06 (diff)
parent6302da37f66fe9bb04e95fe67e8529fe0086187d (diff)
downloadbrew-96cafb4124bf923e7cdef0693e00ab48cdc1dd24.tar.bz2
Merge pull request #3845 from MikeMcQuaid/master
Add prof and ruby commands.
Diffstat (limited to 'Library/Homebrew/dev-cmd/ruby.rb')
-rwxr-xr-xLibrary/Homebrew/dev-cmd/ruby.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/Library/Homebrew/dev-cmd/ruby.rb b/Library/Homebrew/dev-cmd/ruby.rb
new file mode 100755
index 000000000..2df212301
--- /dev/null
+++ b/Library/Homebrew/dev-cmd/ruby.rb
@@ -0,0 +1,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