diff options
Diffstat (limited to 'lib/rbot/rbotconfig.rb')
-rw-r--r-- | lib/rbot/rbotconfig.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/rbot/rbotconfig.rb b/lib/rbot/rbotconfig.rb index eb55f965..d6f6bcde 100644 --- a/lib/rbot/rbotconfig.rb +++ b/lib/rbot/rbotconfig.rb @@ -33,9 +33,9 @@ class Bot version = $version end debug "loaded rubygems, looking for rbot version #{$version} (rbot-#{version})" - gemname, gem = Gem.source_index.find{|name, spec| spec.name == 'rbot' && spec.version.version == version} - debug "got gem #{gem}" - if gem && path = gem.full_gem_path + gem = Gem::Specification.find{|spec| spec.name == 'rbot' && spec.version.version == version} + if gem + path = gem.full_gem_path debug "installed via rubygems to #{path}" @@datadir = "#{path}/data/rbot" @@coredir = "#{path}/lib/rbot/core" |