[#19261] lstripped here-document (Re: comments and continuing strings on the next line) — nobu.nakada@...

なかだです。

29 messages 2003/01/01
[#19360] Re: lstripped here-document (Re: comments and continuing strings on the next line) — "K.Kosako" <kosako@...> 2003/01/15

nobu.nakada@nifty.ne.jpさんの

[#19361] Re: lstripped here-document (Re: comments and continuing strings on the next line) — "NAKAMURA, Hiroshi" <nakahiro@...> 2003/01/15

なひです。

[#19364] Re: lstripped here-document (Re: comments and continuing strings on the next line) — nobu.nakada@... 2003/01/17

なかだです。

[#19366] Re: lstripped here-document (Re: comments and continuing strings on the next line) — "NAKAMURA, Hiroshi" <nakahiro@...> 2003/01/17

なひです。

[#19299] [BUG] errno == 0 — Kazuhiro Yoshida <moriq@...>

もりきゅうです。win32だけかもしれません。

22 messages 2003/01/04
[#19301] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19302] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19303] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19304] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19306] Re: [BUG] errno == 0 — nobu.nakada@... 2003/01/05

なかだです。

[ruby-dev:19354] shellwords()

From: "Akinori MUSHA" <knu@...>
Date: 2003-01-11 20:20:42 UTC
List: ruby-dev #19354
 shellwords() が '...' 内の \ をメタ文字扱いしてしまうのですが、
以下のように修正するとまずいことはありますか?

Sun Jan 12 05:12:18 2003  Akinori MUSHA  <knu@iDaemons.org>

	* lib/shellwords.rb (shellwords): '\' in single quotes should not
	  be regarded as meta character.  This bug or maybe feature was
	  inherited from Perl's shellwords.pl.

Index: shellwords.rb
===================================================================
RCS file: /src/ruby/lib/shellwords.rb,v
retrieving revision 1.5
diff -u -r1.5 shellwords.rb
--- shellwords.rb	3 Jun 2001 19:25:07 -0000	1.5
+++ shellwords.rb	11 Jan 2003 20:17:29 -0000
@@ -26,9 +26,8 @@
 	  snippet.gsub!(/\\(.)/, '\1')
 	elsif line =~ /\A"/ then #"
 	  raise ArgumentError, "Unmatched double quote: #{line}"
-        elsif line.sub!(/\A'(([^'\\]|\\.)*)'/, '') then #'
+	elsif line.sub!(/\A'([^']*)'/, '') then #'
 	  snippet = $1
-	  snippet.gsub!(/\\(.)/, '\1')
 	elsif line =~ /\A'/ then #'
 	  raise ArgumentError, "Unmatched single quote: #{line}"
 	elsif line.sub!(/\A\\(.)/, '') then

-- 
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"It went right by me -- At the time it went over my head
   I was looking out the window.. I should have looked at your face instead"

In This Thread

Prev Next