From: Steve Tuckner Date: 2004-09-29T12:37:21+09:00 Subject: Re: DRY ruby idiom David A. Black wrote: > $ ruby -e 'a = b if b' > -e:1: undefined local variable or method `b' for main:Object > (NameError) > > > Perhaps I should clarify how I was using this. Lets say I have a variable with a default value and I want to overwrite it with something else as long as it is non-nil. a = "default" a = foo.value if foo.value I just wanted to see if there was a simple way to avoid the double foo.value that I was missing. Thanks for all your responses. Steve Tuckner