From: matz@... (Yukihiro Matsumoto) Date: 2000-08-08T17:15:33+09:00 Subject: [ruby-talk:04336] Re: TABWTDI and Hash.new([]) Hi, In message "[ruby-talk:04333] Re: TABWTDI and Hash.new([])" on 00/08/08, Hugh Sasse Staff Elec Eng writes: |class A | def initialize(some_arg = nil) | @a = if some_arg | some_arg | else | [] | end | @obj = if iterator? | Proc.new | else | nil | end | end The block argument may help. It retrieve the given block as a Proc object. > def initialize(some_arg = nil, &proc) > @a = if some_arg > some_arg > else > [] > end > @obj = proc > end matz.