lib/gem-wrappers.rb in gem-wrappers-1.3.0 vs lib/gem-wrappers.rb in gem-wrappers-1.3.1
- old
+ new
@@ -18,12 +18,11 @@
# gem executables
executables.each do |executable|
installer.install(executable)
end
- # ruby executables
- %w{ruby gem erb irb ri rdoc testrb}.each do |executable|
+ ruby_executables.each do |executable|
installer.install(executable)
end
end
def self.uninstall(executables)
@@ -37,8 +36,16 @@
installer.wrappers_path
end
def self.environment_file
environment.file_name
+ end
+
+ private
+
+ def self.ruby_executables
+ Dir.chdir(RbConfig::CONFIG["bindir"]) {
+ Dir["*"].select{ |file| File.executable?(file) }
+ }
end
end