diff --git a/awk.rb b/awk.rb index 2dc82f6..7e495c8 100644 --- a/awk.rb +++ b/awk.rb @@ -45,7 +45,7 @@ def fs(fs) def eval self.instance_eval(&@beg_act) if @beg_act - @exe.each_ do |record| + @exe.each do |record| @nr += 1 @a = record.split(@fs) @nf = @a.length diff --git a/command.rb b/command.rb index be1dc81..441b20a 100644 --- a/command.rb +++ b/command.rb @@ -30,10 +30,6 @@ def exec_with(i,o,e) return pid end - def awk(fs=nil,&block) - Rubish::Awk.make(self,fs,&block) - end - def to_s self.cmd end diff --git a/executable.rb b/executable.rb index 6cedb30..d47b355 100644 --- a/executable.rb +++ b/executable.rb @@ -1,5 +1,9 @@ class Rubish::Executable + def awk(fs=nil,&block) + Rubish::Awk.make(self,fs,&block) + end + class AbnormalExits < RuntimeError attr_reader :statuses def initialize(statuses)