Correctly throw a not-supported error on older ruby

git-svn-id: file:///home/svn/framework3/trunk@13223 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2011-07-19 14:49:34 +00:00
parent becf8d756c
commit 628f29c551
1 changed files with 3 additions and 3 deletions

View File

@ -226,9 +226,9 @@ end
def self.win32_console2_verify
buf = "\x00" * 512
out = Win32API.new("kernel32", "GetStdHandle", ["L"], "L").call(STD_OUTPUT_HANDLE)
res = Win32API.new("kernel32","GetConsoleTitle", ["PL"], "L").call(buf, buf.length-1)
( res > 0 and buf.index("Console2 command").nil? ) ? false : true
end
res = Win32API.new("kernel32","GetConsoleTitle", ["PL"], "L").call(buf, buf.length-1) rescue 0
( res > 0 and buf.index("Console2 command").nil? ) ? false : true
end
#
# Platform independent socket pair