[#14715] HTTP Client with Ruby — TAKAHASHI Masayoshi <maki@...>

高橋征義です。

32 messages 1999/06/01
[#14834] Re: HTTP Client with Ruby — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/06/05

なひです.

[#14836] Re: HTTP Client with Ruby — TAKAHASHI Masayoshi <maki@...> 1999/06/05

高橋征義です。

[#14858] Re: HTTP Client with Ruby — gotoken@... (GOTO Kentaro) 1999/06/07

ごとけんです

[#14896] Re: HTTP Client with Ruby — TAKAHASHI Masayoshi <maki@...> 1999/06/07

高橋です。みなさまどうもありがとうございます。

[#14907] Re: HTTP Client with Ruby — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/06/08

なひです.

[#14766] ruby 1.3.4 on BSD/OS 3.1 — Yasunari Momoi <momo@...>

BSD/OS 3.1 (with kame) で ruby-1.3.4 を作ろうとしているんで

18 messages 1999/06/03
[#14770] Re: ruby 1.3.4 on BSD/OS 3.1 — matz@... (Yukihiro Matsumoto) 1999/06/03

まつもと ゆきひろです

[#15012] ext ML の過去ログはいずこ? — 中村暁史 <anakamur@...>

22 messages 1999/06/16
[#15013] Re: ext ML の過去ログはいずこ? — Shin-ichiro Hara <sinara@...> 1999/06/16

原です。

[#15014] Re: ext ML の過去ログはいずこ? — 中村暁史 <anakamur@...> 1999/06/16

[#15015] Re: ext ML の過去ログはいずこ? — Kazunori Akaishi <akaishi@...> 1999/06/16

akaishi です。

[#15016] Re: ext ML の過去ログはいずこ? — 中村暁史 <anakamur@...> 1999/06/16

[#15045] mail library — Minero Aoki <aamine@...>

あおきです。

96 messages 1999/06/20
[#15075] Re: mail library — Minero Aoki <aamine@...> 1999/06/22

あおきです。

[#15122] Re: mail library — Minero Aoki <aamine@...> 1999/06/28

あおきです。

[#15123] Re: mail library — matz@... (Yukihiro Matsumoto) 1999/06/28

まつもと ゆきひろです

[#15125] Re: mail library — WATANABE Hirofumi <watanabe@...> 1999/06/28

わたなべです.

[#15126] Re: mail library — matz@... (Yukihiro Matsumoto) 1999/06/28

まつもと ゆきひろです

[#15146] Re: mail library — Minero Aoki <aamine@...> 1999/06/29

あおきです。

[#15148] Re: mail library — matz@... (Yukihiro Matsumoto) 1999/06/29

まつもと ゆきひろです

[#15161] Re: mail library — Minero Aoki <aamine@...> 1999/06/30

あおきです。

[#15165] Re: mail library — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/06/30

なひです.

[#15167] Re: mail library — Minero Aoki <aamine@...> 1999/06/30

あおきです。

[#15219] Re: mail library — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/07/03

なひです.

[#15228] Re: mail library — hisanori@... 1999/07/05

松尾です。

[#15279] Re: mail library — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/07/07

なひです.

[#15172] Re:mail library — Takeo Iwama <iwamat@...> 1999/07/01

はじめまして、岩間です。

[#15218] JUS workshop ( was Re:mail library ) — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/07/03

なひです.mod_rubyと格闘中です.

[#15220] Mod_ruby server does not respond when POST request. — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/07/03

なひです.mod_rubyネタはruby-listでよいでしょうか?

[#15226] Re: Mod_ruby server does not respond when POST request. — Shugo Maeda <shugo@...> 1999/07/05

前田です。

[#15240] mod_ruby/0.1.2 with Apache/1.3.6 on Solaris/2.5.1 ( was Re: Mod_ruby server does not respond when POST request. ) — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/07/05

なひです.

[#15242] Re: mod_ruby/0.1.2 with Apache/1.3.6 on Solaris/2.5.1 ( was Re: Mod_ruby server does not respond when POST request. ) — Shugo Maeda <shugo@...> 1999/07/05

前田です。

[#15308] Re: mod_ruby/0.1.2 with Apache/1.3.6 on Solaris/2.5.1 — Katsuyuki Komatsu <komatsu@...> 1999/07/08

小松です。

[#15310] Re: mod_ruby/0.1.2 with Apache/1.3.6 on Solaris/2.5.1 — Shugo Maeda <shugo@...> 1999/07/08

前田です。

[#15313] Re: mod_ruby/0.1.2 with Apache/1.3.6 on Solaris/2.5.1 — Katsuyuki Komatsu <komatsu@...> 1999/07/08

小松です。

[#15057] 複雑?な構造体の定義方法 — Koichi Shigematsu <shige@...>

しげまつ と申します。  とっても久しぶりの投稿です。

18 messages 1999/06/21
[#15058] Re: 複雑?な構造体の定義方法 — matz@... (Yukihiro Matsumoto) 1999/06/21

まつもと ゆきひろです

[#15059] Re: 複雑?な構造体の定義方法 — Koichi Shigematsu <shige@...> 1999/06/21

しげまつ です。

[#15061] Re: 複雑?な構造体の定義方法 — matz@... (Yukihiro Matsumoto) 1999/06/21

まつもと ゆきひろです

[#15065] pattern (Re: 複雑?な構造体の定義方法) — gotoken@... (GOTO Kentaro) 1999/06/21

ごとけんです

[#15076] Re: pattern (Re: 複雑?な構造体の定義方法) — matz@... (Yukihiro Matsumoto) 1999/06/22

まつもと ゆきひろです

[#15077] Re: pattern (Re: 複雑?な構造体の定義方法) — gotoken@... (GOTO Kentaro) 1999/06/22

ごとけんです

[ruby-list:15111] attr makes a strange name method

From: Yoshinori Toki <toki@...>
Date: 1999-06-25 08:53:00 UTC
List: ruby-list #15111
土岐です。

Module::attr を使うと a?=, b!=, c== のような変な名前のメソッドが定義で
きてしまいます。さらに c== はスクリプトから普通に呼べてしまうみたいで
す。a?=, b!= は普通に呼び出そうとするとエラーになるんですが、
Object#send と String#intern を使えば呼べてしまいます。あと代入後に作
られるインスタンス変数の名前に ?, !, = が付いてしまってます。

シンボル値ではなく文字列でメソッド名を指定すれば、途中で空白が入ったり
カンマやピリオドで区切ったりしたような名前のメソッドでも定義できてしま
うみたいです。

Ruby のバージョンは ruby 1.3.4 (1999-06-24) [i386-freebsd3.1] です。
別に実害は無いんですが、なんとなく気持悪かったので報告しました。

(ここからテスト用スクリプト)
class AttrTest
  attr :a?, true
  attr :b!, true
  attr :c=, true
  attr "Just another Ruby hacker,", true
end

DEBUG = binding
def debug(expr)
  begin
    puts "EXPR:#{expr}"
    eval(expr, DEBUG)
  rescue
    puts $!
  end
end

debug %q[ attr = AttrTest::new ]

debug %q[ p attr.methods.grep(/^#{Regexp::quote("a?")}/) ]
debug %q[ p attr.methods.grep(/^#{Regexp::quote("b!")}/) ]
debug %q[ p attr.methods.grep(/^#{Regexp::quote("c=")}/) ]

debug %q[ attr.a? = "a" ]
debug %q[ attr.b! = "b" ]
debug %q[ attr.c= = "c" ]
debug %q[ p attr.instance_variables ]

debug %q[ attr.send("a?=".intern, "a") ]
debug %q[ attr.send("b!=".intern, "b") ]
debug %q[ attr.send("c==".intern, "c") ]
debug %q[ p attr.instance_variables ]

debug %q[ p attr.methods.grep(/^Just another Ruby hacker,/) ]
debug %q[ attr.send("Just another Ruby hacker,=".intern, true) ]
debug %q[ p attr.send("Just another Ruby hacker,".intern) ]
debug %q[ p attr.instance_variables ]

(ここから実行結果)
EXPR: attr = AttrTest::new 
EXPR: p attr.methods.grep(/^#{Regexp::quote("a?")}/) 
["a?", "a?="]
EXPR: p attr.methods.grep(/^#{Regexp::quote("b!")}/) 
["b!", "b!="]
EXPR: p attr.methods.grep(/^#{Regexp::quote("c=")}/) 
["c=="]
EXPR: attr.a? = "a" 
(eval):1: compile error
(eval):1: parse error
 attr.a? = "a" 
          ^
EXPR: attr.b! = "b" 
(eval):1: compile error
(eval):1: parse error
 attr.b! = "b" 
          ^
EXPR: attr.c= = "c" 
EXPR: p attr.instance_variables 
["@c="]
EXPR: attr.send("a?=".intern, "a") 
EXPR: attr.send("b!=".intern, "b") 
EXPR: attr.send("c==".intern, "c") 
EXPR: p attr.instance_variables 
["@c=", "@b!", "@a?"]
EXPR: p attr.methods.grep(/^Just another Ruby hacker,/) 
["Just another Ruby hacker,=", "Just another Ruby hacker,"]
EXPR: attr.send("Just another Ruby hacker,=".intern, true) 
EXPR: p attr.send("Just another Ruby hacker,".intern) 
true
EXPR: p attr.instance_variables 
["@c=", "@b!", "@Just another Ruby hacker,", "@a?"]

----------------------------------------------------------------------------
土岐 仁謙	神戸大学物理高エネ研 M2
URL: http://www3.phys.sci.kobe-u.ac.jp/~toki/index.html
PGP fingerprint = D0 A8 90 AB 73 F8 34 FE  CE CA DB BF 01 30 C0 35

In This Thread

Prev Next