[#4076] Re: call/cc — shugo@... (Shugo Maeda)

51 messages 1999/01/08
[#4077] Re: [ruby-list:11512] Re: call/cc — maeda@... 1999/01/08

前田@リコーです。

[#4078] Re: call/cc — shugo@... (Shugo Maeda) 1999/01/08

[#4079] Re: call/cc — kjana@... (YANAGAWA Kazuhisa) 1999/01/08

In message <m0zyZO8-0003EbC@crunkey.chocolate.or.jp>

[#4098] Re: call/cc — shugo@... (Shugo Maeda) 1999/01/11

[#4105] Re: call/cc — EGUCHI Osamu <eguchi@...> 1999/01/12

えぐち@エスアンドイー です。

[#4144] Re: call/cc — shugo@... (Shugo Maeda) 1999/01/13

[#4090] finalizers — matz@... (Yukihiro Matsumoto)

まつもと ゆきひろです

19 messages 1999/01/11

[#4095] Ruby on CYGWIN — TAKAHASHI Masayoshi <maki@...>

高橋です。久しぶりに書きます。

26 messages 1999/01/11
[#4111] Re: Ruby on CYGWIN — WATANABE Hirofumi <watanabe@...> 1999/01/12

わたなべです.

[#4115] Re: Ruby on CYGWIN — TAKAHASHI Masayoshi <maki@...> 1999/01/12

高橋です。Rubyのリンク集から見つけたのですが、sgmailって

[#4118] sgmail (Re: Ruby on CYGWIN) — Takahiro Maebashi <maebashi@...> 1999/01/12

前橋です。

[#4123] Tk? Gtk? (Re: sgmail) — TAKAHASHI Masayoshi <maki@...> 1999/01/13

高橋です。

[#4203] Compile via WATCOM C — ARIMA Yasuhiro <fit0298@...>

有馬です。

20 messages 1999/01/18
[#4204] Re: Compile via WATCOM C — KIMURA Koichi <kimura@...> 1999/01/18

[#4248] patch for ruby-mswin32 — Koji Oda <oda@...1.qnes.nec.co.jp>

小田@QNES です。

27 messages 1999/01/19
[#4254] Re: patch for ruby-mswin32 — matz@... (Yukihiro Matsumoto) 1999/01/19

まつもと ゆきひろです

[#4256] Re: patch for ruby-mswin32 — WATANABE Hirofumi <watanabe@...> 1999/01/19

わたなべです.

[#4258] Re: patch for ruby-mswin32 — matz@... (Yukihiro Matsumoto) 1999/01/19

まつもと ゆきひろです

[#4290] signed/unsigned char — ARIMA Yasuhiro <fit0298@...>

有馬です。

17 messages 1999/01/20
[#4292] Re: signed/unsigned char — EGUCHI Osamu <eguchi@...> 1999/01/20

えぐち@エスアンドイー です。

[#4293] Re: signed/unsigned char — ARIMA Yasuhiro <fit0298@...> 1999/01/20

Regard to "[ruby-dev:4292] Re: signed/unsigned char"

[#4295] Re: signed/unsigned char — EGUCHI Osamu <eguchi@...> 1999/01/20

えぐち@エスアンドイー です。

[#4327] pack("F") for bigendian float — gotoken@... (GOTO Kentaro)

ごとけんです。

25 messages 1999/01/22
[#4330] Re: pack("F") for bigendian float — gotoken@... (GOTO Kentaro) 1999/01/23

ごとけんです

[#4331] Re: pack("F") for bigendian float — gotoken@... (GOTO Kentaro) 1999/01/23

ごとけんです

[#4336] Re: pack("F") for bigendian float — matz@... (Yukihiro Matsumoto) 1999/01/24

まつもと ゆきひろです

[#4337] Re: pack("F") for bigendian float — gotoken@... (GOTO Kentaro) 1999/01/24

ごとけんです

[#4338] Re: pack("F") for bigendian float — Yamashita Junji (山下 純司) <ys_jyunji@...> 1999/01/24

山下 純司です。

[#4341] cascades on ruby — Kazunori NISHI <kazunori@...>

西@九大です。

51 messages 1999/01/25
[#4342] Re: cascades on ruby — Kazuhiro HIWADA <hiwada@...> 1999/01/25

ひわだです。

[#4343] Re: cascades on ruby — Kazunori NISHI <kazunori@...> 1999/01/25

西@九大です。

[#4344] Re: cascades on ruby — matz@... (Yukihiro Matsumoto) 1999/01/25

まつもと ゆきひろです

[#4386] Re: cascades on ruby — keiju@... (石塚圭樹 ) 1999/01/26

けいじゅ@日本ラショナルソフトウェアです.

[#4389] Re: cascades on ruby — matz@... (Yukihiro Matsumoto) 1999/01/26

まつもと ゆきひろです

[#4394] Re: cascades on ruby — keiju@... (石塚圭樹 ) 1999/01/26

けいじゅ@日本ラショナルソフトウェアです.

[#4396] keyword argument (Re: Re: cascades on ruby) — matz@... (Yukihiro Matsumoto) 1999/01/26

[#4399] Re: keyword argument (Re: Re: cascades on ruby) — keiju@... (石塚圭樹 ) 1999/01/26

けいじゅ@日本ラショナルソフトウェアです.

[#4400] Re: keyword argument (Re: Re: cascades on ruby) — matz@... (Yukihiro Matsumoto) 1999/01/26

まつもと ゆきひろです

[#4401] Re: keyword argument (Re: Re: cascades on ruby) — keiju@... (石塚圭樹 ) 1999/01/26

けいじゅ@日本ラショナルソフトウェアです.

[#4404] Re: keyword argument (Re: Re: cascades on ruby) — matz@... (Yukihiro Matsumoto) 1999/01/26

まつもと ゆきひろです

[#4410] Re: keyword argument (Re: Re: cascades on ruby) — keiju@... (石塚圭樹 ) 1999/01/26

けいじゅ@日本ラショナルソフトウェアです.

[#4412] Re: keyword argument (Re: Re: cascades on ruby) — matz@... (Yukihiro Matsumoto) 1999/01/26

まつもと ゆきひろです

[#4473] Re: keyword argument (Re: Re: cascades on ruby) — matz@... (Yukihiro Matsumoto) 1999/01/28

まつもと ゆきひろです

[#4495] Re: keyword argument (Re: Re: cascades on ruby) — shugo@... (Shugo Maeda) 1999/01/29

前田です。

[#4349] Re: [ruby-list:11707] Re: ruby 1.2.2 released — EGUCHI Osamu <eguchi@...>

えぐち@エスアンドイー です。

35 messages 1999/01/25
[#4353] Re: [ruby-list:11707] Re: ruby 1.2.2 released — EGUCHI Osamu <eguchi@...> 1999/01/25

えぐち@エスアンドイー です。

[#4357] --enable-shared/BSD (Re: ) — EGUCHI Osamu <eguchi@...> 1999/01/25

えぐち@エスアンドイー です。

[#4375] Re: --enable-shared/BSD (Re: ) — matz@... (Yukihiro Matsumoto) 1999/01/26

まつもと ゆきひろです

[#4387] Re: --enable-shared/BSD (Re: ) — EGUCHI Osamu <eguchi@...> 1999/01/26

えぐち@エスアンドイー です。

[#4391] Re: --enable-shared/BSD (Re: ) — matz@... (Yukihiro Matsumoto) 1999/01/26

まつもと ゆきひろです

[#4406] Re: --enable-shared/BSD (Re: ) — EGUCHI Osamu <eguchi@...> 1999/01/26

えぐち@エスアンドイー です。

[#4419] Re: module Precision — Inaba Hiroto <inaba@...>

21 messages 1999/01/26
[#4438] Re: module Precision — gotoken@... (GOTO Kentaro) 1999/01/27

ごとけんです

[#4451] Re: module Precision — Inaba Hiroto <inaba@...> 1999/01/27

From: gotoken@math.sci.hokudai.ac.jp (GOTO Kentaro)

[#4453] new class for float of C (Re: module Precision) — gotoken@... (GOTO Kentaro) 1999/01/27

ごとけんです

[#4457] Re: new class for float of C (Re: module Precision) — matz@... (Yukihiro Matsumoto) 1999/01/28

まつもと ゆきひろです

[#4460] Re: new class for float of C (Re: module Precision) — gotoken@... (GOTO Kentaro) 1999/01/28

ごとけんです

[#4461] Re: new class for float of C (Re: module Precision) — matz@... (Yukihiro Matsumoto) 1999/01/28

まつもと ゆきひろです

[#4462] Re: new class for float of C (Re: module Precision) — gotoken@... (GOTO Kentaro) 1999/01/28

ごとけんです

[#4420] ruby 1.3.1-990126 — matz@... (Yukihiro Matsumoto)

まつもと ゆきひろです

17 messages 1999/01/26

[#4452] permit to put a comma — Koji Arai <JCA02266@...>

新井です。

18 messages 1999/01/27
[#4484] Re: permit to put a comma — matz@... (Yukihiro Matsumoto) 1999/01/29

まつもと ゆきひろです

[#4518] Inf.0 — gotoken@... (GOTO Kentaro)

ごとけんです

17 messages 1999/01/30

[ruby-dev:4498] cookie on cgi-lib.rb

From: IKARASHI Akira <ikarashi@...>
Date: 1999-01-30 00:12:44 UTC
List: ruby-dev #4498
五十嵐です。

CGIのスクリプトを書いているのですが、cgi-lib.rb には
cookie を利用する機能がありません。そこで、cookie を
使えるようにしてみたのですが、このような機能を追加
して頂けないでしょうか?

一応パッチを付けます。

# ruby-listの方が良かったでしょうか?


--- cgi-lib.rb.orig	Thu Jan 28 04:02:51 1999
+++ cgi-lib.rb	Sat Jan 30 08:45:16 1999
@@ -18,6 +18,7 @@
 class CGI < SimpleDelegator
 
   attr("inputs")
+  attr("cookie")
 
   # original is CGI.pm
   def read_from_cmdline
@@ -70,10 +71,60 @@
     end
 
     super(@inputs)
+
+    @cookie = {}
+    if env_cookie = ENV['HTTP_COOKIE']
+      env_cookie.split(/; */).each do |x|
+        key, val = x.split(/=/,2).collect{|x|unescape(x)}
+        if @cookie.include?(key)
+          @cookie[key] += "\0" + (val or "")
+        else
+          @cookie[key] = (val or "")
+        end
+      end
+    end
+
+    @header = {"Content-Type"=>"text/html"}
+    @body = ""
+    @title = ""
   end
 
-  def CGI.message(msg, title = "")
-    print "Content-type: text/html\n\n"
+  def set_header(name, val)
+    if @header.include?(name)
+      @header[name] += "\0" + (val or "")
+    else
+      @header[name] = (val or "")
+    end
+    return @header
+  end
+  def set_title(title)
+    @title = title
+  end
+  def set_body(body)
+    @body = body
+  end
+
+  def set_cookie(name, val, expires = "Thu, 1-Jan-2030 00:00:00 GMT", etc = nil)
+    expires = expires.strftime("%a, %d-%b-%Y %X %Z") if expires.type == Time
+    tmp = format("%s=%s; expires=%s;", name, escape(val), expires)
+    tmp.concat format(" %s;", etc) if etc
+    return set_header("Set-Cookie", tmp)
+  end
+  def clear_cookie(name)
+    set_cookie(name, "xx", "Thu, 1-Jan-1980 00:00:00 GMT")
+  end
+
+  def flush
+    CGI.message(@body, @title, @header)
+  end
+
+  def CGI.message(msg, title = "", header = {"Content-Type"=>"text/html"})
+    for name, vals in header
+      for val in vals.split(/\0/)
+        print format("%s: %s\n", name, val)
+      end
+    end
+    print "\n"
     print "<html><head><title>"
     print title
     print "</title></head><body>\n"

In This Thread

Prev Next