Only set KCODE on 1.8, prevent warnings on 1.9
git-svn-id: file:///home/svn/framework3/trunk@8874 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
73cd20f8a6
commit
4c8dbafe1d
|
@ -62,7 +62,7 @@ class DBManager
|
||||||
require 'msf/core/model'
|
require 'msf/core/model'
|
||||||
|
|
||||||
# Database drivers can reset our KCODE, do not let them
|
# Database drivers can reset our KCODE, do not let them
|
||||||
$KCODE = 'NONE'
|
$KCODE = 'NONE' if RUBY_VERSION =~ /^1\.8\./
|
||||||
|
|
||||||
@usable = true
|
@usable = true
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ class DBManager
|
||||||
end
|
end
|
||||||
|
|
||||||
# Database drivers can reset our KCODE, do not let them
|
# Database drivers can reset our KCODE, do not let them
|
||||||
$KCODE = 'NONE'
|
$KCODE = 'NONE' if RUBY_VERSION =~ /^1\.8\./
|
||||||
end
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -165,7 +165,7 @@ class DBManager
|
||||||
return false
|
return false
|
||||||
ensure
|
ensure
|
||||||
# Database drivers can reset our KCODE, do not let them
|
# Database drivers can reset our KCODE, do not let them
|
||||||
$KCODE = 'NONE'
|
$KCODE = 'NONE' if RUBY_VERSION =~ /^1\.8\./
|
||||||
end
|
end
|
||||||
|
|
||||||
@active = true
|
@active = true
|
||||||
|
@ -182,7 +182,7 @@ class DBManager
|
||||||
elog("DB.disconnect threw an exception: #{e}")
|
elog("DB.disconnect threw an exception: #{e}")
|
||||||
ensure
|
ensure
|
||||||
# Database drivers can reset our KCODE, do not let them
|
# Database drivers can reset our KCODE, do not let them
|
||||||
$KCODE = 'NONE'
|
$KCODE = 'NONE' if RUBY_VERSION =~ /^1\.8\./
|
||||||
end
|
end
|
||||||
@active = false
|
@active = false
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue