Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace '*' by '*' on text due to twitter-gem problem #2

Merged
merged 1 commit into from
May 8, 2021

Conversation

kazunetakahashi
Copy link
Owner

@kazunetakahashi kazunetakahashi commented May 8, 2021

要約

投稿本文の * に置き換えます。

本文

問題点

以下のものがうまくいきませんでした。

bot.client.update("05/05: 8月にドイツで開かれるYoung Mathematicians in C*-Algebrasの形態は,オンラインまたはハイブリッドということです. https://ymcstara.org/current-1.html")

結果は以下のとおりです。

Twitter::Error::Unauthorized: Could not authenticate you.

* が含まれている投稿は、このエラーが出ます。

原因

これは twitter gem の問題です。調査内容は sferik/twitter-ruby#677 (comment) にまとまっています。これを見て実験する限り、 gem の使い手が *%2A にエスケープするのは意味がありません。なお、すでに修正が sferik/twitter-ruby#969 で提案されています。

影響範囲

このおかげで、上記ニュース以降のニュースがすべて投稿されていません。

$C^*$-環は、河東先生のご専門 (von Neumann 環) とは違う(一種だというのはともかく)ものの、作用素環論の研究対象であるため、今後もニュースや記事タイトルに登場すると見込まれます。 2019 年以降のニュースに一度も * が登場していなかったので、今まで発覚しませんでした。対策が必須です。

解決策

致し方ないので、投稿本文の * を全角の に置き換えます。これでうまくいくのはテスト済みです。美しくはないですが、すべて日本語で書かれているので、こういう事情ならば許容されるかと存じます。

備考

この問題は #1 の変更とは全く関係がありません。

この修正を反映させて clockwork を再度実行すれば、該当ニュース以降が反映されると見込まれます。

どうぞ、よろしくお願いします。

@kazunetakahashi kazunetakahashi requested a review from tetou May 8, 2021 02:38
@kazunetakahashi kazunetakahashi self-assigned this May 8, 2021
@kazunetakahashi kazunetakahashi changed the title replace '*' by '*' on text due to witter-gem problem replace '*' by '*' on text due to twitter-gem problem May 8, 2021
@kazunetakahashi kazunetakahashi force-pushed the fix-asterisk-problem branch from 64312f6 to 0439bab Compare May 8, 2021 02:41
@kazunetakahashi
Copy link
Owner Author

コミットのメッセージ間違っていたので force-push しました。うっかりしていてすみません。

Copy link
Collaborator

@tetou tetou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kazunetakahashi 修正ありがとうございます!こちら取り込んで再稼働させます。

@tetou tetou merged commit d375b1a into master May 8, 2021
@tetou tetou deleted the fix-asterisk-problem branch May 8, 2021 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants