In win32ole\samlple\ienavi.rb there is coe:
	
	ev.on_event {|*args| default_handler(*args)}
	ev.on_event("NavigateComplete") {|url| navigate(url)}
	ev.on_event("Quit") {|*args| stop_msg_loop} 

	$LOOP = TRUE
	while ($LOOP)
	  WIN32OLE_EVENT.message_loop
	end

$LOOP seems to be a constant. Thus waiting for it is an infinite loop.
Why polluting the namespace?