[#18651] Enumerable#zip — matz@... (Yukihiro Matsumoto)

まつもと ゆきひろです

77 messages 2002/11/05
[#18659] Re: Enumerable#zip — Shin-ichiro HARA <sinara@...> 2002/11/06

原です。

[#18669] Re: Enumerable#zip — matz@... (Yukihiro Matsumoto) 2002/11/06

まつもと ゆきひろです

[#18675] Re: Enumerable#zip — Shin-ichiro HARA <sinara@...> 2002/11/07

原です。

[#18684] Re: Enumerable#zip — matz@... (Yukihiro Matsumoto) 2002/11/07

まつもと ゆきひろです

[#18690] Re: Enumerable#zip — Shin-ichiro HARA <sinara@...> 2002/11/08

原です。

[#18728] Re: Enumerable#zip — Daisuke Aoki <dai@...> 2002/11/09

青木@横浜です。基本的にROM な人間なんですがなんとなく書いてみました。

[#18774] Re: Enumerable#zip — Daisuke Aoki <dai@...> 2002/11/13

青木@横浜です。

[#18799] Re: Enumerable#zip — Shin-ichiro HARA <sinara@...> 2002/11/15

原です。

[#18802] Re: Enumerable#zip — Tanaka Akira <akr@...17n.org> 2002/11/15

In article <5.1.1.8.2.20021115145423.03541008@blade.nagaokaut.ac.jp>,

[#18803] Re: Enumerable#zip — matz@... (Yukihiro Matsumoto) 2002/11/15

まつもと ゆきひろです

[#18806] Re: Enumerable#zip — Tanaka Akira <akr@...17n.org> 2002/11/15

In article <1037348006.479453.32695.nullmailer@picachu.netlab.jp>,

[#18808] Re: Enumerable#zip — matz@... (Yukihiro Matsumoto) 2002/11/15

まつもと ゆきひろです

[#18823] Re: Enumerable#zip — Shugo Maeda <shugo@...> 2002/11/18

前田です。

[#18833] Re: Enumerable#zip — Tanaka Akira <akr@...17n.org> 2002/11/18

In article <8765uv4fu7.wl@studly.priv.netlab.jp>,

[#18835] Re: Enumerable#zip — Shugo Maeda <shugo@...> 2002/11/18

前田です。

[#18845] Re: Enumerable#zip — Tanaka Akira <akr@...17n.org> 2002/11/19

In article <874raf6xuc.wl@studly.priv.netlab.jp>,

[#18870] Re: Enumerable#zip — Shugo Maeda <shugo@...> 2002/11/21

前田です。

[#18873] Re: Enumerable#zip — Tanaka Akira <akr@...17n.org> 2002/11/21

In article <87fztv5zir.wl@studly.priv.netlab.jp>,

[#18692] Re: Enumerable#zip — Tanaka Akira <akr@...17n.org> 2002/11/08

In article <4.3.2-J.20021108124934.033a2eb0@blade.nagaokaut.ac.jp>,

[#18696] Re: Enumerable#zip — Shin-ichiro HARA <sinara@...> 2002/11/08

原です。

[#18713] Re: Enumerable#zip — matz@... (Yukihiro Matsumoto) 2002/11/09

まつもと ゆきひろです

[#18719] Re: Enumerable#zip — Tanaka Akira <akr@...17n.org> 2002/11/09

In article <1036742681.769607.13070.nullmailer@picachu.netlab.jp>,

[#18721] Re: Enumerable#zip — matz@... (Yukihiro Matsumoto) 2002/11/09

まつもと ゆきひろです

[#18723] Re: Enumerable#zip — Tanaka Akira <akr@...17n.org> 2002/11/09

In article <1036847474.074389.7942.nullmailer@picachu.netlab.jp>,

[#18735] Re: Enumerable#zip — Shin-ichiro HARA <sinara@...> 2002/11/11

原です。

[#18746] Re: Enumerable#zip — matz@... (Yukihiro Matsumoto) 2002/11/11

まつもと ゆきひろです

[#18749] Re: Enumerable#zip — Shin-ichiro HARA <sinara@...> 2002/11/12

原です。

[#18766] Re: Enumerable#zip — matz@... (Yukihiro Matsumoto) 2002/11/13

まつもと ゆきひろです

[#18800] Re: Enumerable#zip — Shin-ichiro HARA <sinara@...> 2002/11/15

原です。

[#18801] Re: Enumerable#zip — matz@... (Yukihiro Matsumoto) 2002/11/15

まつもと ゆきひろです

[#18804] Re: Enumerable#zip — Shin-ichiro HARA <sinara@...> 2002/11/15

原です。

[#18805] Re: Enumerable#zip — matz@... (Yukihiro Matsumoto) 2002/11/15

まつもと ゆきひろです

[#18754] Different caller(0) in trace_func when NameError from toplevel between 1.6 and 1.7 — "NAKAMURA, Hiroshi" <nahi@...>

なひです。

27 messages 2002/11/12
[#18755] Re: Different caller(0) in trace_func when NameError from toplevel between 1.6 and 1.7 — nobu.nakada@... 2002/11/12

なかだです。

[#18776] Re: Different caller(0) in trace_func when NameError from toplevel between 1.6 and 1.7 — "NAKAMURA, Hiroshi" <nakahiro@...> 2002/11/14

なひです。

[#18777] Re: Different caller(0) in trace_func when NameError from toplevel between 1.6 and 1.7 — "NAKAMURA, Hiroshi" <nakahiro@...> 2002/11/14

なひです。ひええすいません、タブが落ちちゃった。

[#18789] Re: Different caller(0) in trace_func when NameError from toplevel between 1.6 and 1.7 — "NAKAMURA, Hiroshi" <nahi@...> 2002/11/14

なひです。

[#18795] Re: Different caller(0) in trace_func when NameError from toplevel between 1.6 and 1.7 — nobu.nakada@... 2002/11/15

なかだです。

[#18820] deprecated method( Re: Different caller(0) in trace_func when NameError from toplevel between 1.6 and 1.7) — nobu.nakada@... 2002/11/18

なかだです。

[#18821] Re: deprecated method( Re: Different caller(0) in trace_func when NameError from toplevel between 1.6 and 1.7) — matz@... (Yukihiro Matsumoto) 2002/11/18

まつもと ゆきひろです

[#18825] Re: deprecated method( Re: Different caller(0) in trace_func when NameError from toplevel between 1.6 and 1.7) — nobu.nakada@... 2002/11/18

なかだです。

[#18861] class variables — matz@... (Yukihiro Matsumoto)

まつもと ゆきひろです

31 messages 2002/11/20
[#18913] Re: class variables — "K.Kosako" <kosako@...> 2002/11/22

Yukihiro Matsumotoさんの

[#18895] [patch] install bat file on Windows — "U.Nakamura" <usa@...>

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

14 messages 2002/11/22
[#18900] Re: [patch] install bat file on Windows — "Akinori MUSHA" <knu@...> 2002/11/22

At Fri, 22 Nov 2002 11:09:19 +0900,

[#18903] Re: [patch] install bat file on Windows — "U.Nakamura" <usa@...> 2002/11/22

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

[#18966] [ONIGURUMA] \S doesn't match multibyte char (Re: [ruby-list:36618] Re: 全角文字に挟まれた半角スペースを削除するには?) — nobu.nakada@...

なかだです。

13 messages 2002/11/28

[ruby-dev:18864] Re: class variables

From: Take_tk <ggb03124@...>
Date: 2002-11-21 01:52:53 UTC
List: ruby-dev #18864
たけ(tk)です

[ruby-dev:18863] Re: class variables にて
matz@ruby-lang.org (Yukihiro Matsumoto) さん曰く:

> |>  (4) クラス変数の有効範囲はそのクラス(またはモジュール)限定
> |>      で、サブクラスからは見えない
> |
> |class_attr_accessor が欲しい。
> |で、アクセサメソッドのほうに protected とかの指定をするというのは?。
> 
> おっしゃることは分かるような気がするのですが、もうちょっと具
> 体的に説明していただけませんか。それをどのように使うつもりな
> のかとか、どう嬉しいのかとか。

  まあ、単にクラス変数がたくさんあるクラスを作ったときに、便利かと思いま
して……。

 具体的には、これ(↓)。

http://www.freeml.com/message/ap-ext@freeml.com/0000045

SimpleGetText.rb

class SimpleGetText
  @@read_error = false
  @@src_locale = nil
  @@locale = nil #  "ja_JP.eucJP" "ja_JP.sjis" etc
  @@code = nil   #  EUC, SJIS, UTF
  @@lang = nil   # ja, en etc.
  @@package = nil
  @@locale_file = nil
  @@const_name = nil
  @@dst_hash = {}  
  @@dst_hash_changed = false
  @@no_conv = false
  @@auto_add = true
  @@prepared = nil
	……

このクラスではインスタンスが表には出てこないので(※)、クラス変数でセッ
トしておく必要がある。

require "SimpleGetText"
#SimpleGetText.lang = "ja"
#SimpleGetText.lang = "en"
SimpleGetText.lang = "de"

  p "bonjour"._
  p "bye"._
  p "じゃね!"._

 で、クラス変数のうちで外部から制御可能なものをpublic、承継クラスで制御
可能にしたものとをprotectedというようにして、class_attr_accessorでアクセ
スメソッドを作るようにすれば、細かい制御が可能になる。

class SimpleGetText
private
  @@src_locale = nil
  @@code = nil   #  EUC, SJIS, UTF
public 
  @@read_error = false ; class_attr :read_error
  @@locale = nil       ; class_attr :locale
  @@lang = nil         ; class_attr :lang, true
  @@package = nil      ; class_attr :package, true
  @@no_conv = false    ; class_attr :no_conv, true
  @@auto_add = true    ; class_attr :auto_add, true
protected
  @@locale_file = nil  ; class_attr :locale_file, true
  @@const_name = nil   ; class_attr :const_name
  @@dst_hash = {}      ; class_attr :dst_hash
  @@dst_hash_changed = false ; class_attr :dst_hash_changed, true
  @@prepared = nil     ; class_attr :prepared, true
	……

というような感じかな?

----

※ よくみたら、インスタンスを作っていないじゃん。でも、同じこと。

Take_tk = KUMAGAI Hidetake
たけ(tk)=熊谷秀武


In This Thread