[MacRuby-devel] Regexp possible bug

2009-07-02 Thread Renzo Borgatti
Hi,
If you create a file simple.rb and put the following line inside:

puts ("a...@0ƒz" =~ /\x40/).inspect

and then run with: macruby simple.rb I have the following:

$ macruby simple.rb
simple.rb:1:in `': regexp preprocess failed: too short escaped
multibyte character (ArgumentError)

while it runs fine on ruby MRI (prints 1). The problem seems to be the use
of hex/octals in the regexp but only when the string contains unicode chars.
If you remove the "ƒ" everything goes as expected. Should I file a bug for
this? Let me know,

Thanks
Renzo
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Regexp possible bug

2009-07-02 Thread Renzo Borgatti
Sorry, the AT was escaped, another similar example is:
puts ("aA0ƒz" =~ /\x41/).inspect

searching for the uppercase A.
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Regexp possible bug

2009-07-02 Thread Matt Aimonetti
Using the experimental branch is here what I get:

$ macruby -e 'puts ("aA0ƒz" =~ /\x41/).inspect'
=> 1

$ macruby -e 'puts ("aA0ƒz" =~ /z/).inspect'
5


- Matt


On Thu, Jul 2, 2009 at 3:45 AM, Renzo Borgatti  wrote:

> Sorry, the AT was escaped, another similar example is:
> puts ("aA0ƒz" =~ /\x41/).inspect
>
> searching for the uppercase A.
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Regexp possible bug

2009-07-02 Thread Renzo Borgatti
I forgot to mention I'm on 0.4. Should I consider this fixed in 0.5?
Renzo

On Thu, Jul 2, 2009 at 6:21 PM, Matt Aimonetti wrote:

> Using the experimental branch is here what I get:
>
> $ macruby -e 'puts ("aA0ƒz" =~ /\x41/).inspect'
> => 1
>
> $ macruby -e 'puts ("aA0ƒz" =~ /z/).inspect'
> 5
>
>
> - Matt
>
>
> On Thu, Jul 2, 2009 at 3:45 AM, Renzo Borgatti  wrote:
>
>> Sorry, the AT was escaped, another similar example is:
>> puts ("aA0ƒz" =~ /\x41/).inspect
>>
>> searching for the uppercase A.
>>
>> ___
>> MacRuby-devel mailing list
>> [email protected]
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>>
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Regexp possible bug

2009-07-02 Thread Matt Aimonetti
if you are happy with the output I showed you, let's consider it fixed in
0.5 ;)

- Matt

On Thu, Jul 2, 2009 at 1:35 PM, Renzo Borgatti  wrote:

> I forgot to mention I'm on 0.4. Should I consider this fixed in 0.5?
> Renzo
>
> On Thu, Jul 2, 2009 at 6:21 PM, Matt Aimonetti wrote:
>
>> Using the experimental branch is here what I get:
>>
>> $ macruby -e 'puts ("aA0ƒz" =~ /\x41/).inspect'
>> => 1
>>
>> $ macruby -e 'puts ("aA0ƒz" =~ /z/).inspect'
>> 5
>>
>>
>> - Matt
>>
>>
>> On Thu, Jul 2, 2009 at 3:45 AM, Renzo Borgatti wrote:
>>
>>> Sorry, the AT was escaped, another similar example is:
>>> puts ("aA0ƒz" =~ /\x41/).inspect
>>>
>>> searching for the uppercase A.
>>>
>>> ___
>>> MacRuby-devel mailing list
>>> [email protected]
>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>>
>>>
>>
>> ___
>> MacRuby-devel mailing list
>> [email protected]
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>>
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Regexp possible bug

2009-07-02 Thread Renzo Borgatti
Cool, thanks.
Renzo

On Thu, Jul 2, 2009 at 10:56 PM, Matt Aimonetti wrote:

> if you are happy with the output I showed you, let's consider it fixed in
> 0.5 ;)
>
> - Matt
>
>
> On Thu, Jul 2, 2009 at 1:35 PM, Renzo Borgatti  wrote:
>
>> I forgot to mention I'm on 0.4. Should I consider this fixed in 0.5?
>> Renzo
>>
>> On Thu, Jul 2, 2009 at 6:21 PM, Matt Aimonetti 
>> wrote:
>>
>>> Using the experimental branch is here what I get:
>>>
>>> $ macruby -e 'puts ("aA0ƒz" =~ /\x41/).inspect'
>>> => 1
>>>
>>> $ macruby -e 'puts ("aA0ƒz" =~ /z/).inspect'
>>> 5
>>>
>>>
>>> - Matt
>>>
>>>
>>> On Thu, Jul 2, 2009 at 3:45 AM, Renzo Borgatti wrote:
>>>
 Sorry, the AT was escaped, another similar example is:
 puts ("aA0ƒz" =~ /\x41/).inspect

 searching for the uppercase A.

 ___
 MacRuby-devel mailing list
 [email protected]
 http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


>>>
>>> ___
>>> MacRuby-devel mailing list
>>> [email protected]
>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>>
>>>
>>
>> ___
>> MacRuby-devel mailing list
>> [email protected]
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>>
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel