diff --git a/lib/bundler.rb b/lib/bundler.rb index afc243c4f58..de186ef3ed0 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -89,7 +89,7 @@ def bin_path def setup(*groups) # Return if all groups are already loaded - return @setup if defined?(@setup) + return @setup if defined?(@setup) && @setup definition.validate_ruby! @@ -386,6 +386,11 @@ def reset! @root = nil @settings = nil @definition = nil + @setup = nil + @load = nil + @locked_gems = nil + @bundle_path = nil + @bin_path = nil if defined?(@rubygems) && @rubygems rubygems.undo_replacements @rubygems = nil