From: stevetuckner Date: 2004-09-29T05:29:58+09:00 Subject: DRY ruby idiom I often use the ||= idiom in ruby for late initialization. But was recently looking for an idiom that would allow me to overwrite a variable if the right side is defined without repeating myself. I have used the following: var = val if val but I have to repeat val and that violates DRY. I thought maybe &&= would work, but did not var &&= val That only works if var and val are non-nil. Any ideas out there? Steve Tuckner