[#26295] tail -f のように読み続ける方法は? — Kazuhiro NISHIYAMA <zn@...>

tail -fのようにだんだん大きくなるファイルを読み込み続けるのは

22 messages 2000/12/03
[#26301] Re: tail -f のように読み続ける方法は? — matz@... (Yukihiro Matsumoto) 2000/12/03

まつもと ゆきひろです

[#26303] Re: tail -f のように読み続ける方法は? — WATANABE Tetsuya <tetsu@...> 2000/12/04

渡辺哲也です。

[#26323] Re: tail -f のように読み続ける方法は? — Kazuhiro NISHIYAMA <zn@...> 2000/12/04

On Mon, 4 Dec 2000 10:18:47 +0900

[#26324] Re: tail -f のように読み続ける方法は? — matz@... (Yukihiro Matsumoto) 2000/12/04

まつもと ゆきひろです

[#26331] Re: tail -f のように読み続ける方法は? — nobu.nakada@... 2000/12/04

なかだです。

[#26346] Re: tail -f のように読み続ける方法は? — matz@... (Yukihiro Matsumoto) 2000/12/05

まつもと ゆきひろです

[#26362] Re: tail -f のように読み続ける方法は? — とみたまさひろ <tommy@...> 2000/12/05

とみたです。

[#26368] Re: tail -f のように読み続ける方法は? — matz@... (Yukihiro Matsumoto) 2000/12/06

まつもと ゆきひろです

[#26313] 並行するスレッドの記述法について — Kenya OGATA <ind.onosetu1@...>

おがたといいます。

30 messages 2000/12/04
[#26332] Re: 並行するスレッドの記述法について — nobu.nakada@... 2000/12/04

なかだです。

[#26335] Re: 並行するスレッドの記述法について — Kenya Ogata <k_ogata@...> 2000/12/04

おがたです。なかださんコメントありがとうございます。

[#26337] Re: 並行するスレッドの記述法について — "Nobuyoshi.Nakada" <nobu.nakada@...> 2000/12/05

なかだです。

[#26338] ruby-GD — Akira Muraki <a-muraki@...> 2000/12/05

村木@日立ITです。

[#26354] Re: ruby-GD — "Nobuyoshi.Nakada" <nobu.nakada@...> 2000/12/05

なかだです。

[#26355] Re: ruby-GD — Akira Muraki <a-muraki@...> 2000/12/05

村木です

[#26356] Re: ruby-GD — "U.Nakamura" <usa@...> 2000/12/05

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

[#26415] cgi.rb で InsecureOperation — Takeshi Komiya <katsuwo@...>

25 messages 2000/12/07

[#26536] ファイル名が文字化け — KUROSAWA Takashi <tabby@...>

Tabby as くろさわ@秩父です。

21 messages 2000/12/14
[#26537] Re: ファイル名が文字化け — WATANABE Hirofumi <eban@...> 2000/12/15

わたなべです.

[#26554] Hash.new — Takao KAWAMURA <kawamura@...>

Hash.newの挙動について、理解できないことがありましたので、教

47 messages 2000/12/16
[#26555] Re: Hash.new — gotoken@... (GOTO Kentaro) 2000/12/16

ごとけんです

[#26559] Re: Hash.new — nobu.nakada@... 2000/12/16

なかだです。

[#26561] Re: Hash.new — gotoken@... (GOTO Kentaro) 2000/12/16

In message "[ruby-list:26559] Re: Hash.new"

[#26564] Re: Hash.new — matz@... (Yukihiro Matsumoto) 2000/12/16

まつもと ゆきひろです

[#26565] Re: Hash.new — gotoken@... (GOTO Kentaro) 2000/12/16

In message "[ruby-list:26564] Re: Hash.new"

[#26566] Re: Hash.new — Yasushi Shoji <yashi@...> 2000/12/16

At Sun, 17 Dec 2000 02:23:14 +0900,

[#26567] Re: Hash.new — gotoken@... (GOTO Kentaro) 2000/12/16

In message "[ruby-list:26566] Re: Hash.new"

[#26569] Re: Hash.new — Yasushi Shoji <yashi@...> 2000/12/16

At Sun, 17 Dec 2000 03:28:55 +0900,

[#26576] Re: Hash.new — matz@... (Yukihiro Matsumoto) 2000/12/17

まつもと ゆきひろです

[#26605] [Q] Oracle PL/SQL with bind vars — Hideto ISHIBASHI <hideto-i@...4u.or.jp>

石橋秀仁です。

28 messages 2000/12/18
[#26642] Re: [Q] Oracle PL/SQL with bind vars — Yoshida Masato <yoshidam@...> 2000/12/19

よしだです

[#26656] Re: [Q] Oracle PL/SQL with bind vars — Hideto ISHIBASHI <hideto-i@...4u.or.jp> 2000/12/20

石橋秀仁です。よしださん、リプライありがとうございます。

[#26696] Re: [Q] Oracle PL/SQL with bind vars — Yoshida Masato <yoshidam@...> 2000/12/21

よしだです

[#26701] Re: [Q] Oracle PL/SQL with bind vars — Hideto ISHIBASHI <hideto-i@...4u.or.jp> 2000/12/21

石橋秀仁です。こんばんは。

[#26703] 一行野郎と Ruby について (Re: [Q] Oracle PL/SQL with bind vars) — Hideto ISHIBASHI <hideto-i@...4u.or.jp> 2000/12/21

石橋秀仁です。こんばんは。

[#26609] net/http,smtp,pop 1.2 pre 1 — Minero Aoki <aamine@...>

あおきです。

24 messages 2000/12/18
[#26653] Re: net/http,smtp,pop 1.2 pre 1 — TAKAHASHI Masayoshi <maki@...> 2000/12/20

高橋征義です。

[#26658] cgi.rb and Regexp::last_match — OHSHIMA Ryunosuke <ryu@...>

大島です。

53 messages 2000/12/20
[#26666] Re: cgi.rb and Regexp::last_match — Wakou Aoyama <wakou@...> 2000/12/20

青山です。

[#26668] Re: cgi.rb and Regexp::last_match — matz@... (Yukihiro Matsumoto) 2000/12/21

まつもと ゆきひろです

[#26711] Re: cgi.rb and Regexp::last_match — Wakou Aoyama <wakou@...> 2000/12/21

青山です。

[#26713] Re: cgi.rb and Regexp::last_match — Shin-ichiro Hara <sinara@...> 2000/12/22

原です。

[#26716] Re: cgi.rb and Regexp::last_match — matz@... (Yukihiro Matsumoto) 2000/12/22

まつもと ゆきひろです

[#26721] Re: cgi.rb and Regexp::last_match — ARIMA Yasuhiro <fit0298@...> 2000/12/22

有馬です。

[#26722] Re: cgi.rb and Regexp::last_match — matz@... (Yukihiro Matsumoto) 2000/12/22

まつもと ゆきひろです

[#26791] Re: cgi.rb and Regexp::last_match — "Akinori MUSHA" <knu@...> 2000/12/24

At Fri, 22 Dec 2000 15:03:17 +0900,

[#26811] Re: cgi.rb and Regexp::last_match — matz@... (Yukihiro Matsumoto) 2000/12/24

まつもと ゆきひろです

[#26670] Re: cgi.rb and Regexp::last_match — "K.Kosako" <kosako@...>

さっきruby-listに入ったばかりなので、

27 messages 2000/12/21
[#26672] Re: cgi.rb and Regexp::last_match — matz@... (Yukihiro Matsumoto) 2000/12/21

まつもと ゆきひろです

[#26675] Re: cgi.rb and Regexp::last_match — "K.Kosako" <kosako@...> 2000/12/21

> まつもと ゆきひろです

[#26677] Re: cgi.rb and Regexp::last_match — Shugo Maeda <shugo@...> 2000/12/21

前田です。

[#26678] Re: cgi.rb and Regexp::last_match — "K.Kosako" <kosako@...> 2000/12/21

> 前田です。

[#26679] Re: cgi.rb and Regexp::last_match — Shugo Maeda <shugo@...> 2000/12/21

前田です。

[#26683] Re: cgi.rb and Regexp::last_match — "K.Kosako" <kosako@...> 2000/12/21

> 前田です。

[#26725] ruby 1.6.2-preview4 — matz@... (Yukihiro Matsumoto)

まつもと ゆきひろです

34 messages 2000/12/22

[#26735] gpib-rb — kiwamu <kiwamu@...>

こんにちは。岡部と申します。

17 messages 2000/12/22

[#26846] Ruby 1.6.2 — matz@... (Yukihiro Matsumoto)

まつもと ゆきひろです

16 messages 2000/12/25

[ruby-list:26469] rbnamazu-0.4 on ruby-1.4.6

From: ryu@...
Date: 2000-12-09 11:35:08 UTC
List: ruby-list #26469
大島です。

From: ryu@jaist.ac.jp
Subject: [ruby-list:26451] Re: cgi.rb で 	InsecureOperation
Date: Fri, 8 Dec 2000 17:26:04 +0900

> rbnamazu-0.4 は ruby-1.4.6 でも動くんじゃないかと思っていましたが、
> 正規表現の m オプションで引っ掛かりますね。考えてみると m オプション
> は無くても問題なさそうなので除去します。ついでに、eval()を使っていた
> 部分はセキュリティ的にまずいので、eval()を使わないように変更しました。
> 以下に rbnamazu-0.4 へのパッチを添付します。

このメールのパッチでは不十分でした。ぼけていて、正規表現の m オプショ
ンを n オプションを混同してしまっていました。代りに以下のパッチを使っ
てください。

いずれにせよ、rbnamazuの出力関連はまだ処理がかなり甘いので、近いうち
に修正します。

大島 龍之介	ryu@jaist.ac.jp

Attachments (1)

rbnamazu-0.4.diff (3.69 KB, text/x-diff)
diff -ur rbnamazu-0.4/nmzdoc.rb current/nmzdoc.rb
--- rbnamazu-0.4/nmzdoc.rb	Mon Dec  4 01:50:14 2000
+++ current/nmzdoc.rb	Sat Dec  9 19:48:48 2000
@@ -241,22 +241,33 @@
       open(@templatedirname + templatename) do |file|
 	template = file.read()
       end
-      template.gsub!(/<form.*<\/form>/im, '') unless @options['form']
+      template.gsub!(/<form[\S\s]*?<\/form[^>]*?>/i, '') unless @options['form']
       template.gsub!(/\{cgi\}/i, File.basename($0))
-      template.gsub!(/\$\{(namazu::)?([^\}]+)\}/, '#{\2}')
+      template.gsub!(/\$\{(namazu::)?([^\}]+?)\}/i, '#{\2}')
       if querystring
-	querystring = querystring.gsub(/&/n, '&amp;').gsub(/\"/n, '&quot;').gsub(/>/n, '&gt;').gsub(/</n, '&lt;')
-	template.gsub!(/(<input[^>]+name="query"[^>]*)>/im,
+	querystring = querystring.gsub(/[&\"><]/n) do
+	  case $&
+	  when '&'
+	    '&amp;'
+	  when '"'
+	    '&quot;'
+	  when '>'
+	    '&gt;'
+	  when '<'
+	    '&lt;'
+	  end
+	end
+	template.gsub!(/(<input[^>]+?name="?query"?[^>]*?)>/i,
 			  '\1 value="'+ querystring + '">')
-	template.gsub!(/<\/title>/i, ': &lt;' + querystring + '&gt;\&')
+	template.gsub!(/<\/title[^>]*?>/i, ': &lt;' + querystring + '&gt;\&')
       end
       @options.each() do |key, value|
-	template.gsub!(/<select[^>]+name="#{key}".*?<\/select>/im) do
+	template.gsub!(/<select[^>]+?name="?#{key}"?[\S\s]*?<\/select[^>]*?>/i) do
 	  |selections|
-	  selections.gsub!(/\s*selected\s*/im, ' ')
-	  unless selections.gsub!(/(<option[^>]+value="#{value}"[^>]*)>/im,
+	  selections.gsub!(/\s*selected\s*/i, ' ')
+	  unless selections.gsub!(/(<option[^>]+?value="?#{value}"?[^>]*?)>/i,
 				  '\1 selected>')
-	    selections.sub!(/<\/select>/im,
+	    selections.sub!(/<\/select[^>]*?>/i,
 			    '<option value="' + value.to_s() +
 			    '" selected>' + value.to_s() + "\n" + '\&')
 	  end
@@ -304,11 +315,13 @@
 	end
       end
 
-      tmpresult = nil
+      public_values = {}
       (result << "<dl>\n") if @options['html']
       counter = nmzsummary.whence() + 1
-      uri = title = score = i = author = date = summary = size = nil
+      i = uri = score = size = nil
       for listno in (1 .. nmzsummary.maxlength())
+	public_values['counter'] = counter
+	public_values['listno'] = listno
 	uri = nmzsummary[counter - 1]['uri']
 	if @options['decode-uri']
 	  uri.tr!('+', ' ')
@@ -321,24 +334,27 @@
 	    uri.sub!(*value)
 	  end
 	end
-	title = nmzsummary[counter - 1]['subject']
+	public_values['uri'] = uri
+	public_values['title'] = nmzsummary[counter - 1]['subject']
 	score = nmzsummary[counter - 1]['score'].to_i().to_s()
 	i = (score.length() - 1) % 3 + 1
 	while (i < score.length())
 	  score[i, 0] = ','
 	  i += 4
 	end
-	author = nmzsummary[counter - 1]['from']
-	date = nmzsummary[counter - 1]['date']
-	summary = nmzsummary[counter - 1]['summary']
+	public_values['score'] = score
+	public_values['author'] = nmzsummary[counter - 1]['from']
+	public_values['date'] = nmzsummary[counter - 1]['date']
+	public_values['summary'] = nmzsummary[counter - 1]['summary']
 	size = nmzsummary[counter - 1]['size']
 	i = (size.length() - 1) % 3 + 1
 	while (i < size.length())
 	  size[i, 0] = ','
 	  i += 4
 	end
-	eval("tmpresult = %Q\x1f" + resulttemplate + "\n\x1f")
-	result << tmpresult
+	public_values['size'] = size
+	result << resulttemplate.gsub(/\#{(.*?)}/) do public_values[$1]	end
+	result << "\n"
 	counter += 1
       end
       (result << "</dl>\n") if @options['html']
@@ -414,9 +430,9 @@
     private
     def html2text(html)
       text = html.dup()
-      text.gsub!(/<!--.*?-->/im, '')
-      text.gsub!(/<.*?>/im, '')
-      text.gsub!(/\n{3,}/im, "\n\n")
+      text.gsub!(/<!--[\S\s]*?-->/i, '')
+      text.gsub!(/<[^>]*?>/i, '')
+      text.gsub!(/\n{3,}/i, "\n\n")
       text
     end
 

In This Thread