perhaps the local var wsh is going out of scope when the method ends ??
perhaps:
# ----------------------------------
require 'win32ole'
class Testnet
def initialize() @wsh = WIN32OLE.new('WScript.Shell')
end
def popup(msg) @wsh.popup(msg, 0, "TESTNET POPUP")
end
end # class
tn = Testnet.new()
tn.popup("This is a test message.")
# ----------------------------------
Also, sometimes if the text message passed to Windows API UI functions,
does not resolve to a valid string, they can fail silently.
You could add some validation code to the popup() method, before calling
the WSH popup function.