Only set KCODE on 1.8, prevent warnings on 1.9

git-svn-id: file:///home/svn/framework3/trunk@8874 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2010-03-22 12:34:06 +00:00
parent 73cd20f8a6
commit 4c8dbafe1d
1 changed files with 4 additions and 4 deletions

View File

@ -62,7 +62,7 @@ class DBManager
require 'msf/core/model'
# Database drivers can reset our KCODE, do not let them
$KCODE = 'NONE'
$KCODE = 'NONE' if RUBY_VERSION =~ /^1\.8\./
@usable = true
@ -106,7 +106,7 @@ class DBManager
end
# Database drivers can reset our KCODE, do not let them
$KCODE = 'NONE'
$KCODE = 'NONE' if RUBY_VERSION =~ /^1\.8\./
end
#
@ -165,7 +165,7 @@ class DBManager
return false
ensure
# Database drivers can reset our KCODE, do not let them
$KCODE = 'NONE'
$KCODE = 'NONE' if RUBY_VERSION =~ /^1\.8\./
end
@active = true
@ -182,7 +182,7 @@ class DBManager
elog("DB.disconnect threw an exception: #{e}")
ensure
# Database drivers can reset our KCODE, do not let them
$KCODE = 'NONE'
$KCODE = 'NONE' if RUBY_VERSION =~ /^1\.8\./
end
@active = false
end