1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-12 11:52:01 +01:00

Fixes #345. Adds a more stringent check for ::Encoding class being defined, should work around false positives with getbyte

git-svn-id: file:///home/svn/framework3/trunk@7095 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
HD Moore 2009-09-30 03:25:39 +00:00
parent ce1b528b05
commit 0c802ea3e1

View File

@ -4428,7 +4428,7 @@ module RbReadline
end
end
if defined? ''.getbyte
if(Object.const_defined?('Encoding') and Encoding.respond_to?('default_external'))
@encoding = "X" # ruby 1.9.x or greater
@encoding_name = Encoding.default_external.to_s
end