[#23231] What do you think about changing the return value of Kernel#require and Kernel#load to the source encoding of the required file? — =?ISO-8859-15?Q?Wolfgang_N=E1dasi-Donner?= <ed.odanow@...>

Dear Ruby developers and users!

8 messages 2009/04/17

[#23318] [Feature #1408] 0.1.to_r not equal to (1/10) — Heesob Park <redmine@...>

Feature #1408: 0.1.to_r not equal to (1/10)

19 messages 2009/04/26

[ruby-core:23205] Re: Regexp Encoding

From: James Gray <james@...>
Date: 2009-04-14 16:12:59 UTC
List: ruby-core #23205
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

In This Thread

Prev Next