[#45609] ruby 1.8.6のNKFにおける漢字変換の不具合について — 京和 崇行 <kyowa_t@...>

初めましてこんにちは。カカクコムの京和と申します。

14 messages 2008/11/04

[ruby-list:45628] Shell::Filter の +

From: Kouya <kouyataifu4@...>
Date: 2008-11-08 00:24:07 UTC
List: ruby-list #45628
こんにちは、kouyaです。

Shell::Filter のリファレンスマニュアルを書いています。

+ () メソッドの使い方がよくわからないので、教えていただけませんでしょうか。

下記のサンプルを実行すると、 Shell::Filter::Join がないとエラーがでます。
確かに /opt/local/lib/ruby/1.8/shellあたりをgrep してもJoinの定義は無いようですし。
よろしくお願いします。

サンプル
  require 'shell'
  sh = Shell.new
  sh.transact {
    (cat("/etc/passwd") + cat("/etc/passwd")).each {|l|
      puts l
    }
  }

結果
ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-darwin9.2.0]
(eval):5: warning: discarding old Fail
(eval):7: warning: redefine included
/opt/local/lib/ruby/1.8/shell.rb:43: warning: method redefined;
discarding old debug=
/opt/local/lib/ruby/1.8/shell.rb:107: warning: method redefined;
discarding old debug=
/opt/local/lib/ruby/1.8/shell.rb:55: warning: instance variable
@default_system_path not initialized
/opt/local/lib/ruby/1.8/shell.rb:67: warning: instance variable
@default_record_separator not initialized
/opt/local/lib/ruby/1.8/shell/filter.rb:87:in `+': uninitialized
constant Shell::Filter::Join (NameError)
	from plus.rb:5
	from /opt/local/lib/ruby/1.8/shell/command-processor.rb:252:in `instance_eval'
	from /opt/local/lib/ruby/1.8/shell/command-processor.rb:252:in `transact'
	from /opt/local/lib/ruby/1.8/shell/command-processor.rb:519:in `__send__'
	from /opt/local/lib/ruby/1.8/shell/command-processor.rb:519:in `transact'
	from plus.rb:4

-- 
kouya

In This Thread

Prev Next