From 653e57fa03ca854b6567a414a4ed949798d3f387 Mon Sep 17 00:00:00 2001 From: Samuel Kadolph Date: Fri, 10 Jun 2011 12:24:08 -0400 Subject: [PATCH] Fixed finding load paths for the gem --- bin/pirb | 3 ++- bin/pruby | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/pirb b/bin/pirb index 7201000..bc8a1a7 100755 --- a/bin/pirb +++ b/bin/pirb @@ -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) diff --git a/bin/pruby b/bin/pruby index 12fe0e2..92735ef 100755 --- a/bin/pruby +++ b/bin/pruby @@ -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)