Correctly throw a not-supported error on older ruby
git-svn-id: file:///home/svn/framework3/trunk@13223 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
becf8d756c
commit
628f29c551
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue