Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

rubygems_plugin: avoid double-loading "hanna/version.rb"

closes #8
  • Loading branch information...
commit 7b64fcb818cf74325ef30f90fab3c2677d0eb038 1 parent d292775
@mislav authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/rubygems_plugin.rb
6 lib/rubygems_plugin.rb
@@ -3,14 +3,16 @@
require 'rubygems/requirement'
# define the Hanna namespace to prevent actions of rubygems_plugin from older versions
- module Hanna; end
+ module ::Hanna; end
class << Gem::DocManager
alias load_rdoc_without_version_constraint load_rdoc
# overwrite load_rdoc to load the exact version of RDoc that Hanna works with
def load_rdoc
- load File.expand_path(File.join(File.dirname(__FILE__), 'hanna', 'version.rb'))
+ unless defined? ::Hanna::VERSION
+ load File.expand_path(File.join(File.dirname(__FILE__), 'hanna', 'version.rb'))
+ end
Hanna::require_rdoc(false) # don't terminate if failed

0 comments on commit 7b64fcb

Please sign in to comment.
Something went wrong with that request. Please try again.