From: Austin Ziegler Date: 2005-09-23T10:55:50+09:00 Subject: Re: static local variables On 9/22/05, jdm wrote: > i'm trying to create what C calls a static local variable inside a particular > method, i.e. this variable should not be visible outside the method and its > value should survive the activation of the method. > > instance variables are "static" but visible to all methods of the instance. > > local variables are visible only to a particular method but aren't "static". > > i've been through the pickaxe book and nothing obvious popped out at me. it > seems i could synthesize the desired functionality using singleton methods > attached to a particular instance (or maybe by defining a block within the > method) but i'm hoping there's a simpler, cleaner way. There is no equivalent in Ruby. Use instance variables. -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca