diff --git a/Library/Homebrew/dev-cmd/ruby.rb b/Library/Homebrew/dev-cmd/ruby.rb index 5cfe6ea0d7f7a..24ca0ae004077 100644 --- a/Library/Homebrew/dev-cmd/ruby.rb +++ b/Library/Homebrew/dev-cmd/ruby.rb @@ -13,6 +13,8 @@ def ruby_args Run a Ruby instance with Homebrew's libraries loaded, e.g. `brew ruby -e "puts :gcc.f.deps"` or `brew ruby script.rb`. EOS + switch "-r", + description: "Load a library using `require`." switch "-e", description: "Execute the given text string as a script." switch :verbose diff --git a/docs/Manpage.md b/docs/Manpage.md index 76c4464ef18c3..036685a17e8dc 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -914,6 +914,8 @@ provided it defaults to `origin/master`. Run a Ruby instance with Homebrew's libraries loaded, e.g. `brew ruby -e "puts :gcc.f.deps"` or `brew ruby script.rb`. +* `-r`: + Load a library using `require`. * `-e`: Execute the given text string as a script. diff --git a/manpages/brew.1 b/manpages/brew.1 index cd254a8a38a5e..67d3d9b1b3eec 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -1157,6 +1157,10 @@ Print as a Markdown list\. Run a Ruby instance with Homebrew\'s libraries loaded, e\.g\. \fBbrew ruby \-e "puts :gcc\.f\.deps"\fR or \fBbrew ruby script\.rb\fR\. . .TP +\fB\-r\fR +Load a library using \fBrequire\fR\. +. +.TP \fB\-e\fR Execute the given text string as a script\. .