"Ben Tilly" <ben_tilly / hotmail.com> writes: > matz / zetabits.com (Yukihiro Matsumoto) wrote: > > > >Hi, > > > >In message "[ruby-talk:10435] Re: Recall Regexp options?" > > on 01/02/07, "Ben Tilly" <ben_tilly / hotmail.com> writes: > > > >|>I'll fix it soon. > >| > >|Thank you, and if you make the options available as an > >|attribute of Ruby, I will be most grateful. > > > >I will do this too. Do you think Regexp#options is a good name for > >the method? > > > Yup. Then you can duplicate an RE exactly with: > > new_re = Regexp.new(re.source, re.options, re.kcode.to_s) Although it would also be nice to have new_re = Regexp.new(re) (as well as the more prosaic new_re = re.dup) Dave