tdiary/tdiary-core — Issue #132: ruby 1.9.3にupdateするとrecent_comment3でEncoding::CompatibilityError
Author: smbd
Created: 2012-01-30 15:18:43+00:00
State: open

ruby 1.8.7-p352で動かしていた日記をruby 1.9.3-p0で動かしたところ以下のエラーを吐いてしまいます。

````
500 Internal Server Error

incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string) (Encoding::CompatibilityError)

/home/smbd/www/diary/tdiary/comment.rb:16:in `scan'
/home/smbd/www/diary/tdiary/comment.rb:16:in `shorten'
(plugin/recent_comment3.rb):65:in `block (2 levels) in recent_comment3'
(plugin/recent_comment3.rb):58:in `each'
(plugin/recent_comment3.rb):58:in `block in recent_comment3'
/home/smbd/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/pstore.rb:325:in `block (2 levels) in transaction'
/home/smbd/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/pstore.rb:324:in `catch'
/home/smbd/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/pstore.rb:324:in `block in transaction'
:10:in `synchronize'
/home/smbd/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/pstore.rb:316:in `transaction'
/home/smbd/www/diary/tdiary/compatible.rb:20:in `transaction'
(plugin/recent_comment3.rb):56:in `recent_comment3'
(TDiary::Plugin#eval_src):351:in `block in eval_src'
/home/smbd/www/diary/tdiary/plugin.rb:100:in `eval'
/home/smbd/www/diary/tdiary/plugin.rb:100:in `block in eval_src'
/home/smbd/www/diary/tdiary/core_ext.rb:82:in `block in safe'
/home/smbd/www/diary/tdiary/core_ext.rb:80:in `call'
/home/smbd/www/diary/tdiary/core_ext.rb:80:in `safe'
/home/smbd/www/diary/tdiary/plugin.rb:99:in `eval_src'
/home/smbd/www/diary/tdiary.rb:235:in `do_eval_rhtml'
/home/smbd/www/diary/tdiary.rb:170:in `eval_rhtml'
/home/smbd/www/diary/tdiary/dispatcher/index_main.rb:43:in `run'
/home/smbd/www/diary/tdiary/dispatcher/index_main.rb:6:in `run'
/home/smbd/www/diary/tdiary/dispatcher.rb:21:in `dispatch_cgi'
index2.rb:36:in `

'
````