[#10853] Why limit class def to a constant or colon node? — Charles Oliver Nutter <charles.nutter@...>

Is there a historical reason why I can't do something like these:

12 messages 2007/04/03

[#10933] Cannot build with extra library path if previous version already installed — <noreply@...>

Bugs item #10140, was opened at 2007-04-16 17:32

10 messages 2007/04/16
[#10934] Re: [ ruby-Bugs-10140 ] Cannot build with extra library path if previous version already installed — nobu@... 2007/04/16

Hi,

[#10960] Re: [ ruby-Bugs-10140 ] Cannot build with extra library path if previous version already installed — "Michal Suchanek" <hramrach@...> 2007/04/18

On 4/16/07, nobu@ruby-lang.org <nobu@ruby-lang.org> wrote:

[#10967] Re: [ ruby-Bugs-10140 ] Cannot build with extra library path if previous version already installed — Nobuyoshi Nakada <nobu@...> 2007/04/19

Hi,

[#10970] Re: [ ruby-Bugs-10140 ] Cannot build with extra library path if previous version already installed — "Michal Suchanek" <hramrach@...> 2007/04/19

On 4/19/07, Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:> Hi,>> At Wed, 18 Apr 2007 20:21:44 +0900,> Michal Suchanek wrote in [ruby-core:10960]:> > Yes. And this should also apply to extensions. The mkmf tests are now> > fine but the extension is linked with -L/sw/lib before -L../..>> Indeed.>>> Index: configure.in> ===================================================================> --- configure.in (revision 12191)> +++ configure.in (working copy)> @@ -1385,5 +1385,4 @@ if test "$enable_rpath" = yes; then> fi>> -LDFLAGS="-L. $LDFLAGS"> AC_SUBST(ARCHFILE)>This would break the previous fix so I did not even try to apply this ^

[#11003] miniruby loads extensions from already installed ruby — <noreply@...>

Bugs item #10303, was opened at 2007-04-23 10:44

10 messages 2007/04/23

[#11025] gsub with backslash characters in replacement string — "Adam Bozanich" <adam.boz@...>

Hello, spotted this one the other day:

10 messages 2007/04/26

Re: [patch] gsub with backslash characters in replacement string

From: Hugh Sasse <hgs@...>
Date: 2007-04-26 15:16:52 UTC
List: ruby-core #11035
On Thu, 26 Apr 2007, Lyle Johnson wrote:

> On 4/26/07, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
> 
> > It was intentional to escape backslashes in replacement string.
> > If it were a bug, how do we escape backslashes?  Any idea?
> 
> Why does his second example:
> 
>    '\\'.gsub('\\', '\\\\\\')
> 
> result in "\\\\" (with four backslashes) instead of "\\\" (with three)?

Well, firstly because you can't have "\\\" because you'd need a char
for the 3rd backslash to quote.  Why is the first case only one (quoted)
backslash?

irb(main):003:0> '\\'.gsub(/\\/,'\\\\')
=> "\\"
irb(main):004:0> '\\'.gsub(/\\/,'\\\\\\')
=> "\\\\"
irb(main):005:0> '\\'.gsub(/\\/,'\\\\\\\\')
=> "\\\\"
irb(main):006:0> '\\'.gsub(/\\/,'\\\\\\\\\\')
=> "\\\\\\"

I seem to remember that the second parameter of gsub gets pushed though
backslash processing twice.  So the double backslash (quoted) in '\\\\'
becomes a single backslash  \ == '\\'.

[I have wished for a string type with NO quoting of ANY characters
for handling backslashes readably, but have no useful suggestions
for what it should be. %b{}, maybe %n{},... ??  In some
circumstances the Exim mail transfer agent's configuration file has
syntax for changing the quoting character within literals. Borrowing
that would mean doing frightful things with the parser, though.  Not
exactly light entertainment for the maintainer.]

        Hugh

In This Thread