Non trivial features changes in 1.7.2 via CVS

If you are tracking the cvs version of ruby1.7.2 there has been a
change in behaviour that affects many libraries. You’ll get this
warning

…/rmail/parser.rb:104: warning: string pattern instead of regexp;
metacharacters no longer effective

    • Generally, you can fix it by changing code from
      from a quoted string to a regexp. Sometimes however
      the warning is a false positive. My understanding
      was that metacharacters only worked if the string
      was a “single char”. You will get this warning for
      strings that are multi-char but contain a .
    • The biggest problem I’ve run into so far is that StringBase in
      rubicon seems pretty broken and my simple-minded patches don’t
      fix it.
    • Booker C. Bense
···

bbense+comp.lang.ruby.Aug.07.02@telemark.stanford.edu writes:

The biggest problem I’ve run into so far is that StringBase in
rubicon seems pretty broken and my simple-minded patches don’t
fix it.

I’d look at it, but… the current CVS 1.7 doesn’t build on my Linux
box: for some reason it tries to compile Win32API…

Dave

Hello –

If you are tracking the cvs version of ruby1.7.2 there has been a
change in behaviour that affects many libraries. You’ll get this
warning

…/rmail/parser.rb:104: warning: string pattern instead of regexp;
metacharacters no longer effective

    • Generally, you can fix it by changing code from
      from a quoted string to a regexp. Sometimes however
      the warning is a false positive. My understanding
      was that metacharacters only worked if the string
      was a “single char”. You will get this warning for
      strings that are multi-char but contain a .

In the past, strings longer than one char were treated as regexes:

dblack@laptop:~$ ruby -ve ‘p %q{abc.def.ghi}.split(“.”)’
ruby 1.6.7 (2002-03-01) [i686-linux-gnu]
[“abc”, “def”, “ghi”]
dblack@laptop:~$ ruby -e ‘p %q{abc.def.ghi}.split(“d…”)’
[“abc.”, “.ghi”]

but now, I believe, all strings are treated as strings:

dblack@laptop:~$ ruby/ruby -ve ‘p %q{abc.def.ghi}.split(“.”)’
ruby 1.7.2 (2002-08-06) [i686-linux]
[“abc”, “def”, “ghi”]
dblack@laptop:~$ ruby/ruby -e ‘p %q{abc.def.ghi}.split(“d…”)’
-e:1: warning: string pattern instead of regexp; metacharacters no
longer effective
[“abc.def.ghi”]

I think this means it makes sense for the warning to appear when it
does (but I’m also pretty sure the warning will disappear in 1.8 [?]).

David

···

On Thu, 8 Aug 2002 bbense+comp.lang.ruby.Aug.07.02@telemark.stanford.edu wrote:


David Alan Black
home: dblack@candle.superlink.net
work: blackdav@shu.edu
Web: http://pirate.shu.edu/~blackdav

Obviously a plot by Microsoft.

Hal

···

----- Original Message -----
From: “Dave Thomas” Dave@PragmaticProgrammer.com
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Wednesday, August 07, 2002 4:24 PM
Subject: Re: Non trivial features changes in 1.7.2 via CVS

I’d look at it, but… the current CVS 1.7 doesn’t build on my Linux
box: for some reason it tries to compile Win32API…

Hi,

Dave Thomas Dave@PragmaticProgrammer.com writes:

I’d look at it, but… the current CVS 1.7 doesn’t build on my Linux
box: for some reason it tries to compile Win32API…

Hmm, do you have libkernel32.a in library path?
if so, I’ll prepare another method.

···


eban

In article Pine.LNX.4.30.0208071733220.27607-100000@candle.superlink.net,

···

David Alan Black dblack@candle.superlink.net wrote:

Hello –

On Thu, 8 Aug 2002 bbense+comp.lang.ruby.Aug.07.02@telemark.stanford.edu wrote:

If you are tracking the cvs version of ruby1.7.2 there has been a
change in behaviour that affects many libraries. You’ll get this
warning

…/rmail/parser.rb:104: warning: string pattern instead of regexp;
metacharacters no longer effective

    • Generally, you can fix it by changing code from
      from a quoted string to a regexp. Sometimes however
      the warning is a false positive. My understanding
      was that metacharacters only worked if the string
      was a “single char”. You will get this warning for
      strings that are multi-char but contain a .

In the past, strings longer than one char were treated as regexes:

    • DOH! No wonder my patches don’t work… I am the master of
      remembering things backwards.
    • Thanks,
    • Booker C. Bense

I’d look at it, but… the current CVS 1.7 doesn’t build on my Linux
box: for some reason it tries to compile Win32API…

Obviously a plot by Microsoft.

Hal

Oh no, Microsoft got to Matz :wink:

WATANABE Hirofumi eban@os.rim.or.jp writes:

I’d look at it, but… the current CVS 1.7 doesn’t build on my Linux
box: for some reason it tries to compile Win32API…

Hmm, do you have libkernel32.a in library path?
if so, I’ll prepare another method.

This is a SuSE 7.2 box:

dave[ext/Win32API 7:52:26] ruby -d extconf.rb
checking for main() in -lkernel32… gcc -o conftest -I/tc/usr/lib/ruby/1.6/i686-linux -g -O2 -I/tc/usr/include -rdynamic conftest.c -lkernel32 -lc -ldl -lcrypt -lm
yes
creating Makefile

dave[ext/Win32API 7:52:35] locate kernel32
/usr/lib/libkernel32.so

Perhaps it’s part of Wine?

Dave

Hi,

Dave Thomas Dave@PragmaticProgrammer.com writes:

This is a SuSE 7.2 box:

dave[ext/Win32API 7:52:26] ruby -d extconf.rb
checking for main() in -lkernel32… gcc -o conftest -I/tc/usr/lib/ruby/1.6/i686-linux -g -O2 -I/tc/usr/include -rdynamic conftest.c -lkernel32 -lc -ldl -lcrypt -lm
yes
creating Makefile

dave[ext/Win32API 7:52:35] locate kernel32
/usr/lib/libkernel32.so

Perhaps it’s part of Wine?

Bingo.
ftp://ftp.suse.com/pub/suse/i386/7.2/suse/contents/wine
I’ve Added checking for existence of <windows.h>.
Try the latest CVS.

Thanks,

···


eban