Skip to content

Commit b3e27b1

Browse files
committed
Derp, include is a class method
1 parent 227418b commit b3e27b1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/msf/core/db_manager.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class DBManager
1919

2020
# Mainly, it's Ruby 1.9.1 that cause a lot of problems now, along with Ruby 1.8.6.
2121
# Ruby 1.8.7 actually seems okay, but why tempt fate? Let's say 1.9.3 and beyond.
22-
def self.warn_about_rubies
22+
def warn_about_rubies
2323
if ::RUBY_VERSION =~ /^1\.9\.[012]($|[^\d])/
2424
$stderr.puts "**************************************************************************************"
2525
$stderr.puts "Metasploit requires at least Ruby 1.9.3. For an easy upgrade path, see https://rvm.io/"
@@ -118,7 +118,9 @@ def initialize_database_support
118118
# If Mdm::Host is defined, the dynamically created classes
119119
# are already in the object space
120120
begin
121-
include MetasploitDataModels unless defined? Mdm::Host
121+
unless defined? Mdm::Host
122+
self.class.send :include, MetasploitDataModels
123+
end
122124
rescue NameError => e
123125
warn_about_rubies
124126
raise e

0 commit comments

Comments
 (0)