Fixed finding load paths for the gem

This commit is contained in:
Samuel Kadolph committed 2011-06-10 12:24:08 -04:00
1 parent f6792e150d
commit 653e57fa03
2 files changed
+4 -2

No files matched your search

+2 -1
View File
@@ -1,7 +1,8 @@
#!/usr/bin/env ruby
executable = File.expand_path("../" + Gem.default_exec_format % "irb", Gem.ruby)
load_paths = Gem.loaded_specs["sockets"].load_paths.map { |p| "-I#{p}" }
full_gem_path = Gem.loaded_specs["sockets"].full_gem_path
load_paths = Gem.loaded_specs["sockets"].require_paths.map { |p| "-I#{File.join(full_gem_path, p)}" }
# TODO: support argument switches
exec(executable, *load_paths, "-rsockets/env", *ARGV)
+2 -1
View File
@@ -1,7 +1,8 @@
#!/usr/bin/env ruby
executable = Gem.ruby
load_paths = Gem.loaded_specs["sockets"].load_paths.map { |p| "-I#{p}" }
full_gem_path = Gem.loaded_specs["sockets"].full_gem_path
load_paths = Gem.loaded_specs["sockets"].require_paths.map { |p| "-I#{File.join(full_gem_path, p)}" }
# TODO: support argument switches
exec(executable, *load_paths, "-rsockets/env", *ARGV)