[#35688] サブクラスのオブジェクト生成時に、スーパークラスの初期化を行うには ? — Onodera Takafumi <onodera-tak@...>

9 messages 2002/08/01

[#35772] Unsecure world writeable dirの警告 — "井上 浩一" <kyoui32@...>

=1B$B0f>e$G$9!#=1B(B

31 messages 2002/08/26
[#35774] Re: Unsecure world writeable dir の警告 — matz@... (Yukihiro Matsumoto) 2002/08/26

まつもと ゆきひろです

[#35775] Re: Unsecure world writeabledir の警告 — nobu.nakada@... 2002/08/26

なかだです。

[#35776] Re: Unsecure world writeabledir の警告 — matz@... (Yukihiro Matsumoto) 2002/08/26

まつもと ゆきひろです

[#35778] Re: Unsecure world writeabledir の警告 — nobu.nakada@... 2002/08/26

なかだです。

[#35779] Re: Unsecure world writeabledir の警告 — WATANABE Hirofumi <eban@...> 2002/08/26

わたなべです。

[#35780] Re: Unsecure world writeabledir の警告 — nobu.nakada@... 2002/08/26

なかだです。

[#35784] Re: Unsecure world writeabledir の警告 — "U.Nakamura" <usa@...> 2002/08/26

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

[#35854] Re: Unsecure world writeabledir の警告 — "Inoue" <rubyist@...1.117.ne.jp> 2002/09/04

井上です。

[#35865] Re: Unsecure world writeabledir の警告 — Koji Arai <JCA02266@...> 2002/09/05

新井です。

[#35866] Re: Unsecure world writeabledir の警告 — matz@... (Yukihiro Matsumoto) 2002/09/06

まつもと ゆきひろです

[#35789] multipart な CGI を速くしたい — Takashi Kanai <kanai@...4u.or.jp>

Windows上でRubyとMySQLを使ってショッピングサイトのようなものを作って

17 messages 2002/08/28

[ruby-list:35700] import-module (Re: Re: scope-in-state)

From: Shin-ichiro HARA <sinara@...>
Date: 2002-08-02 09:10:45 UTC
List: ruby-list #35700
原です。

こんな感じなのを作ってみました。([RAA: Import Module])

   require "import-module"
   class Foo
     def hello
       puts 'hello'
     end
   end

   module Bar
     def hello
       puts 'bye'
     end
   end

   module Baz
     def hello
       puts 'good-bye'
     end
   end

   foo = Foo.new
   foo.hello                   #=> hello
   Foo.import_module(Bar) do
     foo.hello                 #=> bye
     Foo.import_module(Baz) do
       foo.hello               #=> good-bye
     end
     foo.hello                 #=> bye
   end
   foo.hello                   #=> hello


エイリアス名ベースで push, pop するという怪しいものですが、
スピードは速くて

     Foo.import_module(Bar) do
       10000.times do
         foo.hello
       end
     end

で比較すると、同内容の scope-in-state より 100 倍ほど速いです。
もっとも

     10000.times do
       Foo.import_module(Bar) do
         foo.hello
       end
     end

だと、20 倍遅いですが。(当校比 -- あてにならず。)

一応、$IMPORT_MODULE_thread_safe = true で、マルチスレッド対応
したつもりですが、まだ十分吟味していません。この時は、前者では
4 倍早く、後者では 40 倍遅いです。

In This Thread