致命的 #908
完了display_requirements が有効なとき、(あん)ふぁぼられると落ちる
説明
display_requirements プラグインを無効にして起動していたらこんな例外で落ちました
/home/k/mikutter/core/plugin/display_requirements/display_requirements.rb:90:in `block (2 levels) in <top (required)>': no implicit conversion of URI::HTTPS into String (TypeError) [Thread 0x7fffbfd7d700 (LWP 28756) exited] from /opt/ruby/lib/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/listener.rb:25:in `call' from /opt/ruby/lib/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:97:in `block (2 levels) in call_all_listeners' from /opt/ruby/lib/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:96:in `each' [Thread 0x7fff97dfd700 (LWP 24180) exited] from /opt/ruby/lib/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:96:in `block in call_all_listeners' from /opt/ruby/lib/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:95:in `catch' from /opt/ruby/lib/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:95:in `call_all_listeners' [Thread 0x7ffff154a700 (LWP 24178) exited] from /opt/ruby/lib/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:45:in `block (2 levels) in call' from /opt/ruby/lib/ruby/gems/2.4.0/gems/delayer-0.0.2/lib/delayer/procedure.rb:24:in `run' from /opt/ruby/lib/ruby/gems/2.4.0/gems/delayer-0.0.2/lib/delayer/extend.rb:58:in `run_once' from /opt/ruby/lib/ruby/gems/2.4.0/gems/delayer-0.0.2/lib/delayer/extend.rb:30:in `run' from /opt/ruby/lib/ruby/gems/2.4.0/gems/delayer-0.0.2/lib/delayer.rb:43:in `method_missing' from /home/k/mikutter/core/plugin/gtk/delayer.rb:10:in `block in boot' from /home/k/mikutter/core/plugin/gtk/mainloop.rb:10:in `main' from /home/k/mikutter/core/plugin/gtk/mainloop.rb:10:in `mainloop' from ./mikutter.rb:65:in `boot!' from ./mikutter.rb:94:in `<main>'
Message#perma_link が URI を返すようになった(?)影響のようなので、とりあえず文字列化してやれば動くようにはなります
diff --git a/core/plugin/display_requirements/display_requirements.rb b/core/plugin/display_requirements/display_requirements.rb index f9c4369..7493749 100644 --- a/core/plugin/display_requirements/display_requirements.rb +++ b/core/plugin/display_requirements/display_requirements.rb @@ -87,7 +87,7 @@ Plugin.create :display_requirements do activity(:like, "#{message.user[:idname]}: #{message.to_s}", description:(_("@%{user} がいいねいいねしました") % {user: user[:idname]} + "\n" + "@#{message.user[:idname]}: #{message.to_s}\n"+ - message.perma_link), + message.perma_link.to_s), icon: user[:profile_image_url], related: message.user.me? || user.me?, service: service) @@ -97,7 +97,7 @@ Plugin.create :display_requirements do activity(:dont_like, "#{message.user[:idname]}: #{message.to_s}", description:(_("@%{user} があんいいねしました") % {user: user[:idname]} + "\n" + "@#{message.user[:idname]}: #{message.to_s}\n"+ - message.perma_link), + message.perma_link.to_s), icon: user[:profile_image_url], related: message.user.me? || user.me?, service: service)
バックトレース
/home/k/mikutter/core/plugin/display_requirements/display_requirements.rb:90:in `block (2 levels) in <top (required)>': no implicit conversion of URI::HTTPS into String (TypeError)
[Thread 0x7fffbfd7d700 (LWP 28756) exited]
from /opt/ruby/lib/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/listener.rb:25:in `call'
from /opt/ruby/lib/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:97:in `block (2 levels) in call_all_listeners'
from /opt/ruby/lib/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:96:in `each'
[Thread 0x7fff97dfd700 (LWP 24180) exited]
from /opt/ruby/lib/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:96:in `block in call_all_listeners'
from /opt/ruby/lib/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:95:in `catch'
from /opt/ruby/lib/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:95:in `call_all_listeners'
[Thread 0x7ffff154a700 (LWP 24178) exited]
from /opt/ruby/lib/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:45:in `block (2 levels) in call'
from /opt/ruby/lib/ruby/gems/2.4.0/gems/delayer-0.0.2/lib/delayer/procedure.rb:24:in `run'
from /opt/ruby/lib/ruby/gems/2.4.0/gems/delayer-0.0.2/lib/delayer/extend.rb:58:in `run_once'
from /opt/ruby/lib/ruby/gems/2.4.0/gems/delayer-0.0.2/lib/delayer/extend.rb:30:in `run'
from /opt/ruby/lib/ruby/gems/2.4.0/gems/delayer-0.0.2/lib/delayer.rb:43:in `method_missing'
from /home/k/mikutter/core/plugin/gtk/delayer.rb:10:in `block in boot'
from /home/k/mikutter/core/plugin/gtk/mainloop.rb:10:in `main'
from /home/k/mikutter/core/plugin/gtk/mainloop.rb:10:in `mainloop'
from ./mikutter.rb:65:in `boot!'
from ./mikutter.rb:94:in `<main>'
toshi_a 初音 さんが約8年前に更新
- ステータス を 実装待ち から レビュー待ち に変更
- 担当者 を toshi_a 初音 から rhen ium に変更
String#+でくっつけるの微妙だなあと思ったので別の方法を使いました。この辺は多分3.5で大幅に変わってくるんでどっちでも良かったかもですが。
こちらでも問題の再現と、fixの確認できたので、一応見てもらっていいですか