From: Julius Plenz Date: 2004-12-07T07:22:34+09:00 Subject: Re: Ruby 2.0 * Lyndon Samson [2004-12-06]: > Stay tuned for a mail client written in or with ruby embedded that > lets you execute your sigs ;-) Well, maybe that's overkill. This simple script is as good... ;-) #v+ #!/usr/bin/env ruby # Julius Plenz @exec = [] @lines = [] @lines << $_.chomp while gets @lines.reverse.each do |line| unless line =~ /^-- $/ @exec << line else @exec.reverse! ruby = IO.popen("ruby", "w+") @exec.each { |s| ruby.puts s } ruby.puts "__END__" ruby.each { |o| puts o } ruby.close end end # vim:set ft=ruby sw=2 et: #v- Julius -- Julius Plenz http://www.plenz.com/