rapid7/metasploit-framework — pull request #4191 by wchen-r7 (2014-11-12 19:51:46+00:00)
Title: Fix #4163 - Update merge_check_key to keep up with 2.1.4 change

This is for https://github.com/rapid7/metasploit-framework/issues/4163

## Root cause

The merge_check_key method (found in Msf::Module::ModuleInfo)) uses respond_to? to check is our object includes a merge_info_description method before merging descriptions. The respond_to? method in 2.1.4 by default no longer checks private and protected methods, and this is breaking our merge_check_key method.

This is the documentation of respond_to? for Ruby 2.1.4:
http://ruby-doc.org/core-2.1.4/Object.html#method-i-respond_to-3F

This is the documentation of respond_to? for Ruby 1.9.3:
http://ruby-doc.org/core-1.9.3/Object.html#method-i-respond_to-3F

## Verification

- [ ] In order to test this, you must be using ruby-2.1.4, which is the version framework will be using soon.
- [ ] Without the patch, do: ```./msfvenom -p windows/meterpreter/reverse_tcp -o```
- [ ] You should see an "undefined method `gsub' for Array" error
- [ ] With the patch, do the same command again: ```./msfvenom -p windows/meterpreter/reverse_tcp -o```
- [ ] This time, you should see the module information without any errors.