D
Daniel Berger
Hi,
Ruby 1.8.2 RC2
Windows 2000
The good news is that 1.8.2 seems to be handling uint64 types now
without segfaulting. The bad news is that it returns them as a String
instead of a Fixnum (or Bignum). Here's a little demo program:
require "win32ole"
require "socket"
host = ARGV[0] || Socket.gethostname
wmi = WIN32OLE.connect("winmgmts://#{host}/root/cimv2")
wmi.InstancesOf("Win32_Process").each{ |proc|
# string
p proc.Caption
p proc.Caption.class # String
puts "=" * 20
# uint32
p proc.ParentProcessId
p proc.ParentProcessId.class # Fixnum
p proc.SessionId
p proc.SessionId.class # Fixnum
puts "=" * 20
# uint64
p proc.KernelModeTime
p proc.KernelModeTime.class # String ?!
p proc.WorkingSetSize
p proc.WorkingSetSize.class # String ?!
break
}
Any chance this can be fixed before 1.8.2 final?
Regards,
Dan
Ruby 1.8.2 RC2
Windows 2000
The good news is that 1.8.2 seems to be handling uint64 types now
without segfaulting. The bad news is that it returns them as a String
instead of a Fixnum (or Bignum). Here's a little demo program:
require "win32ole"
require "socket"
host = ARGV[0] || Socket.gethostname
wmi = WIN32OLE.connect("winmgmts://#{host}/root/cimv2")
wmi.InstancesOf("Win32_Process").each{ |proc|
# string
p proc.Caption
p proc.Caption.class # String
puts "=" * 20
# uint32
p proc.ParentProcessId
p proc.ParentProcessId.class # Fixnum
p proc.SessionId
p proc.SessionId.class # Fixnum
puts "=" * 20
# uint64
p proc.KernelModeTime
p proc.KernelModeTime.class # String ?!
p proc.WorkingSetSize
p proc.WorkingSetSize.class # String ?!
break
}
Any chance this can be fixed before 1.8.2 final?
Regards,
Dan