[#26664] refactoring tcltklib.c (deleted ip check) — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>

山本です。

22 messages 2005/08/01
[#26665] Re: refactoring tcltklib.c (deleted ip check) — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/08/01

山本です。

[#26668] Re: refactoring tcltklib.c (deleted ip check) — Hidetoshi NAGAI <nagai@...> 2005/08/01

永井@知能.九工大です.

[#26678] Re: refactoring tcltklib.c (deleted ip check) — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/08/01

山本です。

[#26684] Re: refactoring tcltklib.c (deleted ip check) — Hidetoshi NAGAI <nagai@...> 2005/08/01

永井@知能.九工大です.

[#26686] Re: refactoring tcltklib.c (deleted ip check) — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/08/01

山本です。

[#26817] test/socket/test_tcp.rb freeze on windows — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>

山本です。

12 messages 2005/08/18

[#26829] cannot check EOF of pipe on windows — "U.Nakamura" <usa@...>

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

19 messages 2005/08/19
[#26830] Re: cannot check EOF of pipe on windows — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/08/19

山本です。

[#26831] Re: cannot check EOF of pipe on windows — "U.Nakamura" <usa@...> 2005/08/19

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

[#26832] Re: cannot check EOF of pipe on windows — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/08/19

山本です。

[#26836] Re: cannot check EOF of pipe on windows — nobuyoshi nakada <nobuyoshi.nakada@...> 2005/08/19

なかだです。

[#26872] irb -I/ruby -Iと$LOAD_PATH — akira yamada / やまだあきら <akira@...>

Debianユーザからruby -Iとirb -Iで

17 messages 2005/08/24
[#26873] Re: irb -I/ruby -Iと$LOAD_PATH — nobuyoshi nakada <nobuyoshi.nakada@...> 2005/08/24

なかだです。

[#26875] Re: irb -I/ruby -Iと$LOAD_PATH — akira yamada / やまだあきら <akira@...> 2005/08/24

nobuyoshi nakada wrote:

[#26885] Re: irb -I/ruby -Iと$LOAD_PATH — keiju@... (石塚圭樹) 2005/08/26

けいじゅ@いしつかです.

[#26897] fail on make install — KIMURA Koichi <kimura.koichi@...>

木村です。

28 messages 2005/08/29
[#26898] Re: fail on make install — "U.Nakamura" <usa@...> 2005/08/29

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

[#26903] Re: fail on make install — KIMURA Koichi <kbk@...> 2005/08/29

木村です。

[#26922] Re: fail on make install — KIMURA Koichi <kimura.koichi@...> 2005/08/30

木村です。

[#26926] Re: fail on make install — KIMURA Koichi <kimura.koichi@...> 2005/08/31

木村です。

[#26927] Re: fail on make install — "U.Nakamura" <usa@...> 2005/08/31

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

[#26928] Re: fail on make install — KIMURA Koichi <kimura.koichi@...> 2005/08/31

木村です。

[#26929] Re: fail on make install — "U.Nakamura" <usa@...> 2005/08/31

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

[#26930] Re: fail on make install — nobuyoshi nakada <nobuyoshi.nakada@...> 2005/08/31

なかだです。

[#26931] Re: fail on make install — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/08/31

山本です。

[#26933] Re: fail on make install — nobu@... 2005/08/31

なかだです。

[#26938] Re: fail on make install — nobuyoshi nakada <nobuyoshi.nakada@...> 2005/09/01

なかだです。

[#26939] Re: fail on make install — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/09/01

山本です。

[#26900] multiplying empty string — nobuyoshi nakada <nobuyoshi.nakada@...>

19 messages 2005/08/29
[#26904] Re: multiplying empty string — Yukihiro Matsumoto <matz@...> 2005/08/29

まつもと ゆきひろです

[#26907] Re: multiplying empty string — Tanaka Akira <akr@...17n.org> 2005/08/29

In article <1125327516.070646.12845.nullmailer@x31.priv.netlab.jp>,

[#26909] Re: multiplying empty string — Yukihiro Matsumoto <matz@...> 2005/08/29

まつもと ゆきひろです

[ruby-dev:26812] Re: test/nkf/test_kconv.rb

From: "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
Date: 2005-08-17 10:20:30 UTC
List: ruby-dev #26812
山本です。

>module_functionは、インスタンスメソッドをprivateにして、public
>なクラスメソッドにコピーします。なので、たしかにそこでprivateを
>指定しておくのは意味がありません。

>ついでに、forでループさせなくてもmodule_functionは複数同時に指
>定できます。
>
>    module_function(*instance_methods(false))
>    module_function(*private_instance_methods(false))

なるほど。private_class_method を使うとモジュール関数側も private
にできるようなので、まとめるとこんな感じでしょうか。

Index: kconv.rb
===================================================================
RCS file: /src/ruby/ext/nkf/lib/kconv.rb,v
retrieving revision 1.11
diff -u -w -b -p -r1.11 kconv.rb
--- kconv.rb	12 Aug 2005 23:19:58 -0000	1.11
+++ kconv.rb	17 Aug 2005 10:16:14 -0000
@@ -52,8 +52,11 @@ module Kconv
 		   )*\z/nx
   
   # SYMBOL_TO_OPTION is the table for Kconv#conv

+
   # Kconv#conv is intended to generic convertion method,

+
   # so this table specifies symbols which can be supported not only nkf...

+
   SYMBOL_TO_OPTION = {
     :iso2022jp	=> '-j',
     :jis	=> '-j',
@@ -118,9 +121,9 @@ module Kconv
     nkf_opt = '-x -m0 %s %s %s' % [to, from, opt]
     result = ::NKF::nkf( nkf_opt, str)
   end
-  module_function :conv
   alias :kconv :conv

 
+
   #
   # Encode to
   #
@@ -128,27 +131,22 @@ module Kconv
   def tojis(str)
     ::NKF::nkf('-j', str)
   end
-  module_function :tojis
 
   def toeuc(str)
     ::NKF::nkf('-e', str)
   end
-  module_function :toeuc
 
   def tosjis(str)
     ::NKF::nkf('-s', str)
   end
-  module_function :tosjis
 
   def toutf8(str)
     ::NKF::nkf('-w', str)
   end
-  module_function :toutf8
 
   def toutf16(str)
     ::NKF::nkf('-w16', str)
   end
-  module_function :toutf16
 
   alias :to_jis :tojis
   alias :to_euc :toeuc
@@ -166,17 +164,14 @@ module Kconv
   def guess(str)
     ::NKF::guess(str)
   end
-  module_function :guess
 
   def guess_old(str)
     ::NKF::guess1(str)
   end
-  module_function :guess_old
 
   def guess_as_symbol(str)
     CONSTANT_TO_SYMBOL[guess(str)]
   end
-  module_function :guess_as_symbol
 
   #
   # isEncoding
@@ -185,17 +180,14 @@ module Kconv
   def iseuc(str)
     RegexpEucjp.match( str )
   end
-  module_function :iseuc
   
   def issjis(str)
     RegexpShiftjis.match( str )
   end
-  module_function :issjis
 
   def isutf8(str)
     RegexpUtf8.match( str )
   end
-  module_function :isutf8
 
   #
   # encoding?
@@ -204,26 +196,21 @@ module Kconv
   def eucjp?(str)
     RegexpEucjp.match( str ) ? true : false
   end
-  module_function :eucjp?
 
   def shiftjis?(str)
     RegexpShiftjis.match( str ) ? true : false
   end
-  module_function :shiftjis?
+
   def utf8?(str)
     RegexpUtf8.match( str ) ? true : false
   end
-  module_function :utf8?
+
   alias :euc? :eucjp?
   alias :sjis? :shiftjis?
-  module_function :euc?
-  module_function :sjis?
-
 
   #
   # Private Methods
   #
-  private
   def symbol_to_option(symbol)
     if symbol.is_a? Integer
       symbol = CONSTANT_TO_SYMBOL[symbol]
@@ -236,7 +223,13 @@ module Kconv
       return nil
     end
   end
-  module_function :symbol_to_option
+
+  #
+  # Make them module functions
+  #
+  module_function(*instance_methods(false))
+  private_class_method :symbol_to_option
+
 end
 
 class String

In This Thread