From: Takaaki Tateishi Date: 2005-04-09T05:19:25+09:00 Subject: Re: Ruby/DL - assigning to global variables? ajwitte@gmail.com wrote: > module Foo > extend DL::Importable > dlload 'libquux.so' > @@bar = symbol 'bar' > end > > where 'bar' is a variable in libquux. How do I assign a value to bar? @@bar is considered as a pointer to a value. If its type is int, you can assign an integer value as follows. IntValue = struct ["int value"] obj = IntValue.new(@@bar) obj.value = 1 -- Takaaki Tateishi