From: James Gray Date: 2009-04-15T01:12:59+09:00 Subject: [ruby-core:23205] Re: Regexp Encoding On Apr 14, 2009, at 10:12 AM, NARUSE, Yui wrote: > James Gray wrote: >> Can you explain what the magic 16 means here please? > > irb(main):005:0> Regexp::IGNORECASE > => 1 > irb(main):006:0> Regexp::EXTENDED > => 2 > irb(main):007:0> Regexp::MULTILINE > => 4 > irb(main):008:0> Regexp::FIXEDENCODING > => 16 > > Regexp::FIXEDENCODING is a constant for specifying regexp option, > like Regexp::IGNORECASE, Regexp::EXTENDED and Regexp::MULTILINE. So > magic 16 has no special meanings. This means only the value which is > same as ARG_ENCODING_FIXED (in re.c). This value may differ on other > implementations. I understand now. Thank you very much for the explanation. James Edward Gray II