Hi Yasu,

On Dec 2, 2010, at 9:37 PM, Yasu Imao wrote:

> Hi Laurent,
> 
> I filed a ticket on String#gsub performance.

Thanks :)

> While I was playing with regex, I noticed another difference(?) between Ruby 
> 1.8.7 and MacRuby.  
> 
> In Ruby Regexp class, fixnums assigned to Regexp.new options are different 
> with Ruby 1.8.7 and with MacRuby
> 
> Ruby 1.8.7
> 
> p Regexp::IGNORECASE => 1
> p Regexp::MULTILINE => 4
> p Regexp::EXTENDED => 2
> 
> MacRuby
> 
> p Regexp::IGNORECASE => 2
> p Regexp::MULTILINE => 32
> p Regexp::EXTENDED => 4
> 
> Is this because of the difference between Ruby 1.8 and Ruby 1.9 or between 
> Oniguruma and ICU?  Or was there a decision to assign different fixnums to 
> these?

It's actually an implementation detail so far. We can eventually make sure the 
fixnum values of these constants are the same as CRuby (if you file a ticket we 
will fix that for 0.8). I think that users should use the constants and not the 
fixnum values directly in their code, though.

Laurent
_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to