Skip to content

Commit

Permalink
move BigDecimal patch earlier in boot process
Browse files Browse the repository at this point in the history
This makes msfvenom also quiet about the impending deprecation.
  • Loading branch information
busterb committed May 31, 2019
1 parent 8295aeb commit d9d0639
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 12 additions & 0 deletions config/boot.rb
Expand Up @@ -22,6 +22,18 @@
end
end

# Remove bigdecimal warning - start
# https://github.com/ruby/bigdecimal/pull/115
# https://github.com/rapid7/metasploit-framework/pull/11184#issuecomment-461971266
# TODO: remove when upgrading from rails 4.x
require 'bigdecimal'

def BigDecimal.new(*args, **kwargs)
return BigDecimal(*args) if kwargs.empty?
BigDecimal(*args, **kwargs)
end
# Remove bigdecimal warning - end

begin
require 'bundler/setup'
rescue LoadError => e
Expand Down
12 changes: 0 additions & 12 deletions lib/msf/core.rb
Expand Up @@ -13,18 +13,6 @@
# Include backported features for older versions of Ruby
require 'backports'

# Remove bigdecimal warning - start
# https://github.com/ruby/bigdecimal/pull/115
# https://github.com/rapid7/metasploit-framework/pull/11184#issuecomment-461971266
# TODO: remove when upgrading from rails 4.x
require 'bigdecimal'

def BigDecimal.new(*args, **kwargs)
return BigDecimal(*args) if kwargs.empty?
BigDecimal(*args, **kwargs)
end
# Remove bigdecimal warning - end

# The framework-core depends on Rex
require 'rex'
require 'rex/ui'
Expand Down

0 comments on commit d9d0639

Please sign in to comment.