summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/rdoc7
-rwxr-xr-xbin/ri7
2 files changed, 14 insertions, 0 deletions
diff --git a/bin/rdoc b/bin/rdoc
index 8fafd01b0f..64601a819e 100755
--- a/bin/rdoc
+++ b/bin/rdoc
@@ -8,6 +8,13 @@
#
# $Revision$
+begin
+ gem 'rdoc'
+rescue NameError => e # --disable-gems
+ raise unless e.name == :gem
+rescue Gem::LoadError
+end
+
require 'rdoc/rdoc'
begin
diff --git a/bin/ri b/bin/ri
index 243557403c..7fbed0c099 100755
--- a/bin/ri
+++ b/bin/ri
@@ -1,5 +1,12 @@
#!/usr/bin/env ruby
+begin
+ gem 'rdoc'
+rescue NameError => e # --disable-gems
+ raise unless e.name == :gem
+rescue Gem::LoadError
+end
+
require 'rdoc/ri/driver'
RDoc::RI::Driver.run ARGV