=begin ほんの冗談 元ネタ: 転叫院さんのサイト「遅れてきた青年」 http://www2.ocn.ne.jp/~schizo/dame.html 内の日記 6月12日―― SFに禁じ手などない ―― http://www2.ocn.ne.jp/~schizo/ach0206.html#06121 より =end class Filter def tanaka(str, type) num_rand = 10 case type when :ONEDAY str.gsub!(/([。!?])\n/){ str_replace = $1 str_replace << " " if (str_replace == "!") || (str_replace == "?") num_check = rand(num_rand) if num_check == 1 str_replace << "**実は彼は宇宙人だったのだ!**" elsif num_check == 2 str_replace << "**そこはかつてチキューと呼ばれていた星だった!**" elsif num_check == 3 str_replace << "**そのとき太陽は超新星と化した!**" end # $stderr.puts "CHK; tanaka.rb; " + num_check.to_s + "; " + str_replace str_replace << "\n" str_replace } end end end