From: Kazuhiko <kaz...@fd...> - 2011-09-14 15:51:22
|
かずひこです。 rubyという言語そのものにプログラマが「後方互換性を捨てたくなってしまう、 実際に捨てさせてしまう」性質があるとか、腹いせ&八つ当たりでそんなことを 言われるのも不愉快なので(←フレームのもと)、FastCGI + Ruby-1.9環境でも モバイルモードでツッコミを入れられるようにしました。 index.rbでやっているような「UTF-8で試してみてダメならShift_JISにフォール バック」と同じことを、FCGI::each_cgi内のCGI::new呼び出しでもやるようにモ ンキーパッチしています。元がでかいので、fcgi_patch.rbもでかいのですが、 パッチ部分は(明示してありますが)数行です。 とりあえず、tdiary/fcgi_patch.rbに置きましたが、置き場所はこれでいいで しょうか? ローカル環境で、Ruby-1.8とRuby-1.9の両方で、通常のブラウザおよび 'w3m -o user_agent=DoCoMo' で表示とツッコミができることは確認しました。 問題なさそうなら、これをコミットしたいと思います。 かずひこ |