From: daz Date: 2005-07-31T10:41:03+09:00 Subject: Re: Which Regex-Engine will be used in Ruby 1.8.3 Release? Yukihiro Matsumoto wrote: > > Christian Neukirchen writes: > > |Will there be a 1.8.x release with Oniguruma being the default engine? > > It's not planned, for compatibility's sake. Any opinion? > Compatibility in the sense that an invalid Regexp for the current engine could be interpreted as something exotic by Oniguruma ? Would something like the following be possible? : 1.8.3 (say, from Dec 2005) include _both_ (i.e. selectable) Regexp::service_level(0) (DEFAULT) - Current engine Regexp::service_level(1) - Oniguruma ( strict emulation of level(0) )** Regexp::service_level(2) - Oniguruma ( full ) .... where service_level(n) calls Init_Regexp_n() (The transitional method name would *not* become part of the language.) 1.8.4 (or after 6 / 12 months) Regexp::service_level(0) - Current engine ( in case of emergency ;) Regexp::service_level(1) (DEFAULT) - Oniguruma ( strict emulation of level(0) )** Regexp::service_level(2) - Oniguruma ( full ) 1.8.5 (?) Regexp::service_level(1) - Oniguruma ( strict emulation of level(0) )** Regexp::service_level(2) (DEFAULT) - Oniguruma ( full ) A big advantage would be to enable behavioural comparisons from a script without switching between 1.8 / 1.9 ? Quite conservative, too. No-one needs to be concerned that it's there. ** If I read correctly, the Oniguruma team have allowed for building versions tailored to a variety of users. Actually, I'm still going to post but the difference between level(1) & (2) would require adding a lot of almost duplicate code to the Ruby distribution _or_ an awful lot of added logic which I wouldn't wish on anyone. Some clever folks out there though :-) daz